Fix invalid pointer conversions

C does not allow conversions between data pointers and function
pointers.

Yes, the name of the macro is reserved.  That's something for a future
commit to fix.

Fixes #1703
This commit is contained in:
Camilla Löwy
2021-10-21 19:43:01 +02:00
parent 68534cc2ce
commit ee6ff939a5
5 changed files with 26 additions and 26 deletions
+6 -6
View File
@@ -357,12 +357,12 @@ typedef void (APIENTRY * PFN_vkVoidFunction)(void);
}
// Swaps the provided pointers
#define _GLFW_SWAP_POINTERS(x, y) \
{ \
void* t; \
t = x; \
x = y; \
y = t; \
#define _GLFW_SWAP(type, x, y) \
{ \
type t; \
t = x; \
x = y; \
y = t; \
}
// Per-thread error structure