From 63c96643b29ab83f260e1cf328fc2b077286f4d2 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Mon, 25 May 2020 18:27:50 +0200 Subject: [PATCH] Use __typeof__() instead of void* Preserve the real type of a pointer instead of casting to `void*`. Closes #1703. --- src/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal.h b/src/internal.h index 6d7587c8c..c7f37ed58 100644 --- a/src/internal.h +++ b/src/internal.h @@ -218,7 +218,7 @@ typedef void (APIENTRY * PFN_vkVoidFunction)(void); // Swaps the provided pointers #define _GLFW_SWAP_POINTERS(x, y) \ { \ - void* t; \ + __typeof__(x) t; \ t = x; \ x = y; \ y = t; \