diff --git a/glcontext/egl.cpp b/glcontext/egl.cpp index 899f3b8..cc7d12d 100644 --- a/glcontext/egl.cpp +++ b/glcontext/egl.cpp @@ -216,7 +216,7 @@ GLContext * meth_create_context(PyObject * self, PyObject * args, PyObject * kwa return NULL; } - EGLDeviceEXT* devices = malloc(sizeof(EGLDeviceEXT) * num_devices); + EGLDeviceEXT * devices = (EGLDeviceEXT *)malloc(sizeof(EGLDeviceEXT) * num_devices); if (!res->m_eglQueryDevicesEXT(num_devices, devices, &num_devices)) { PyErr_Format(PyExc_Exception, "eglQueryDevicesEXT failed (0x%x)", res->m_eglGetError()); free(devices); diff --git a/glcontext/empty.cpp b/glcontext/empty.cpp index 8827a8b..da73cc3 100644 --- a/glcontext/empty.cpp +++ b/glcontext/empty.cpp @@ -47,7 +47,7 @@ PyMethodDef GLContext_methods[] = { PyType_Slot GLContext_slots[] = { {Py_tp_methods, GLContext_methods}, - {Py_tp_dealloc, GLContext_dealloc}, + {Py_tp_dealloc, (void *)GLContext_dealloc}, {}, }; diff --git a/glcontext/windowed.cpp b/glcontext/windowed.cpp index fdde57e..459b59c 100644 --- a/glcontext/windowed.cpp +++ b/glcontext/windowed.cpp @@ -58,7 +58,7 @@ PyObject * meth_load_opengl_function(PyObject * self, PyObject * arg) { return NULL; } const char * name = PyUnicode_AsUTF8(arg); - return PyLong_FromVoidPtr(glXGetProcAddress((unsigned char *)name)); + return PyLong_FromVoidPtr((void *)glXGetProcAddress((unsigned char *)name)); } #endif