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
+1 -1
View File
@@ -419,7 +419,7 @@ GLFWAPI void* glfwGetMonitorUserPointer(GLFWmonitor* handle)
GLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun cbfun)
{
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
_GLFW_SWAP_POINTERS(_glfw.callbacks.monitor, cbfun);
_GLFW_SWAP(GLFWmonitorfun, _glfw.callbacks.monitor, cbfun);
return cbfun;
}