Anonymous avatar Anonymous committed 9c48682

Fixed some pedantic warnings.

Comments (0)

Files changed (37)

doc/capi/math.rst

 
 .. cfunction:: PyObject* PyVector_NewFromSeq (PyObject *obj)
 
-  Creates a new :ctype:`PyVector` object from the passed *obj*. *obj is treated
+  Creates a new :ctype:`PyVector` object from the passed *obj*. *obj* is treated
   as a sequence of float values (or :ctype:`PyVector`). On failure, this
   returns NULL.
 

doc/src/resources.xml

       </desc>
     </method>
     <method name="get">
-      <call>get (filename) -> StringIO</call>
+      <call>get (filename) -> StringIO or BytesIO</call>
       <desc>Gets a specific file from the Resources.
 
         Raises a KeyError, if *filename* could not be found.
       </desc>
     </method>
     <method name="get_filelike">
-      <call>get_filelike (filename) -> file or StringIO</call>
+      <call>get_filelike (filename) -> file or StringIO or BytesIO</call>
       <desc>
         Like get(), but tries to return the original file handle, if possible.
 
   </class>
 
   <func name="open_tarfile">
-    <call>open_tarfile (archive, filename, dir=None, type=None) -> StringIO</call>
+    <call>open_tarfile (archive, filename, dir=None, type=None) -> StringIO or BytesIO</call>
     <desc>Opens and reads a certain file from a TAR archive.
 
       Opens and reads a certain file from a TAR archive. The result is returned
     </desc>
   </func>
   <func name="open_zipfile">
-    <call>open_zipfile (archive, filename, dir=None) -> StringIO</call>
+    <call>open_zipfile (archive, filename, dir=None) -> StringIO or BytesIO</call>
     <desc>Opens and reads a certain file from a ZIP archive.
 
       Opens and reads a certain file from a ZIP archive. The result is returned

src/base/basemod.c

     
     /* Export C API */
     c_api[PYGAME_BASE_FIRSTSLOT] = state->error;
-    c_api[PYGAME_BASE_FIRSTSLOT+1] = DoubleFromObj;
-    c_api[PYGAME_BASE_FIRSTSLOT+2] = IntFromObj;
-    c_api[PYGAME_BASE_FIRSTSLOT+3] = UintFromObj;
-    c_api[PYGAME_BASE_FIRSTSLOT+4] = DoubleFromSeqIndex;
-    c_api[PYGAME_BASE_FIRSTSLOT+5] = IntFromSeqIndex;
-    c_api[PYGAME_BASE_FIRSTSLOT+6] = UintFromSeqIndex;
-    c_api[PYGAME_BASE_FIRSTSLOT+7] = PointFromObj;
-    c_api[PYGAME_BASE_FIRSTSLOT+8] = SizeFromObj;
-    c_api[PYGAME_BASE_FIRSTSLOT+9] = FPointFromObj;
-    c_api[PYGAME_BASE_FIRSTSLOT+10] = FSizeFromObj;
-    c_api[PYGAME_BASE_FIRSTSLOT+11] = ASCIIFromObj;
-    c_api[PYGAME_BASE_FIRSTSLOT+12] = UTF8FromObj;
-    c_api[PYGAME_BASE_FIRSTSLOT+13] = UlongFromObj;
-    c_api[PYGAME_BASE_FIRSTSLOT+14] = LongFromObj;
-    c_api[PYGAME_BASE_FIRSTSLOT+15] = ColorFromObj;
+    c_api[PYGAME_BASE_FIRSTSLOT+1] = (void *)DoubleFromObj;
+    c_api[PYGAME_BASE_FIRSTSLOT+2] = (void *)IntFromObj;
+    c_api[PYGAME_BASE_FIRSTSLOT+3] = (void *)UintFromObj;
+    c_api[PYGAME_BASE_FIRSTSLOT+4] = (void *)DoubleFromSeqIndex;
+    c_api[PYGAME_BASE_FIRSTSLOT+5] = (void *)IntFromSeqIndex;
+    c_api[PYGAME_BASE_FIRSTSLOT+6] = (void *)UintFromSeqIndex;
+    c_api[PYGAME_BASE_FIRSTSLOT+7] = (void *)PointFromObj;
+    c_api[PYGAME_BASE_FIRSTSLOT+8] = (void *)SizeFromObj;
+    c_api[PYGAME_BASE_FIRSTSLOT+9] = (void *)FPointFromObj;
+    c_api[PYGAME_BASE_FIRSTSLOT+10] = (void *)FSizeFromObj;
+    c_api[PYGAME_BASE_FIRSTSLOT+11] = (void *)ASCIIFromObj;
+    c_api[PYGAME_BASE_FIRSTSLOT+12] = (void *)UTF8FromObj;
+    c_api[PYGAME_BASE_FIRSTSLOT+13] = (void *)UlongFromObj;
+    c_api[PYGAME_BASE_FIRSTSLOT+14] = (void *)LongFromObj;
+    c_api[PYGAME_BASE_FIRSTSLOT+15] = (void *)ColorFromObj;
 
     streamwrapper_export_capi (c_api);
     color_export_capi (c_api);

src/base/bufferproxy.c

 bufferproxy_export_capi (void **capi)
 {
     capi[PYGAME_BUFFERPROXY_FIRSTSLOT] = &PyBufferProxy_Type;
-    capi[PYGAME_BUFFERPROXY_FIRSTSLOT+1] = PyBufferProxy_New;
+    capi[PYGAME_BUFFERPROXY_FIRSTSLOT+1] = (void *)PyBufferProxy_New;
 }
 color_export_capi (void **capi)
 {
     capi[PYGAME_COLOR_FIRSTSLOT] = &PyColor_Type;
-    capi[PYGAME_COLOR_FIRSTSLOT+1] = PyColor_New;
-    capi[PYGAME_COLOR_FIRSTSLOT+2] = PyColor_NewFromNumber;
-    capi[PYGAME_COLOR_FIRSTSLOT+3] = PyColor_NewFromRGBA;
-    capi[PYGAME_COLOR_FIRSTSLOT+4] = PyColor_AsNumber;
+    capi[PYGAME_COLOR_FIRSTSLOT+1] = (void *)PyColor_New;
+    capi[PYGAME_COLOR_FIRSTSLOT+2] = (void *)PyColor_NewFromNumber;
+    capi[PYGAME_COLOR_FIRSTSLOT+3] = (void *)PyColor_NewFromRGBA;
+    capi[PYGAME_COLOR_FIRSTSLOT+4] = (void *)PyColor_AsNumber;
 }

src/base/floatrect.c

 floatrect_export_capi (void **capi)
 {
     capi[PYGAME_FRECT_FIRSTSLOT] = &PyFRect_Type;
-    capi[PYGAME_FRECT_FIRSTSLOT+1] = PyFRect_New;
+    capi[PYGAME_FRECT_FIRSTSLOT+1] = (void *)PyFRect_New;
 }
 font_export_capi(void **capi)
 {
     capi[PYGAME_FONT_FIRSTSLOT + 0] = &PyFont_Type;
-    capi[PYGAME_FONT_FIRSTSLOT + 1] = PyFont_New;
+    capi[PYGAME_FONT_FIRSTSLOT + 1] = (void *)PyFont_New;
 }
 rect_export_capi (void **capi)
 {
     capi[PYGAME_RECT_FIRSTSLOT] = &PyRect_Type;
-    capi[PYGAME_RECT_FIRSTSLOT+1] = PyRect_New;
+    capi[PYGAME_RECT_FIRSTSLOT+1] = (void *)PyRect_New;
 }

src/base/streamwrapper.c

 void
 streamwrapper_export_capi (void **capi)
 {
-    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT] = CPyStreamWrapper_New;
-    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+1] = CPyStreamWrapper_Free;
-    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+2] = CPyStreamWrapper_Read_Threaded;
-    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+3] = CPyStreamWrapper_Read;
-    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+4] = CPyStreamWrapper_Write_Threaded;
-    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+5] = CPyStreamWrapper_Write;
-    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+6] = CPyStreamWrapper_Seek_Threaded;
-    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+7] = CPyStreamWrapper_Seek;
-    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+8] = CPyStreamWrapper_Tell_Threaded;
-    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+9] = CPyStreamWrapper_Tell;
-    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+10] = CPyStreamWrapper_Close_Threaded;
-    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+11] = CPyStreamWrapper_Close;
-    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+12] = IsReadableStreamObj;
-    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+13] = IsWriteableStreamObj;
-    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+14] = IsReadWriteableStreamObj;
+    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT] = (void *)CPyStreamWrapper_New;
+    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+1] = (void *)CPyStreamWrapper_Free;
+    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+2] = (void *)CPyStreamWrapper_Read_Threaded;
+    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+3] = (void *)CPyStreamWrapper_Read;
+    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+4] = (void *)CPyStreamWrapper_Write_Threaded;
+    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+5] = (void *)CPyStreamWrapper_Write;
+    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+6] = (void *)CPyStreamWrapper_Seek_Threaded;
+    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+7] = (void *)CPyStreamWrapper_Seek;
+    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+8] = (void *)CPyStreamWrapper_Tell_Threaded;
+    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+9] = (void *)CPyStreamWrapper_Tell;
+    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+10] = (void *)CPyStreamWrapper_Close_Threaded;
+    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+11] = (void *)CPyStreamWrapper_Close;
+    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+12] = (void *)IsReadableStreamObj;
+    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+13] = (void *)IsWriteableStreamObj;
+    capi[PYGAME_STREAMWRAPPER_FIRSTSLOT+14] = (void *)IsReadWriteableStreamObj;
 }

src/base/surface.c

 surface_export_capi (void **capi)
 {
     capi[PYGAME_SURFACE_FIRSTSLOT] = &PySurface_Type;
-    capi[PYGAME_SURFACE_FIRSTSLOT+1] = PySurface_New;
+    capi[PYGAME_SURFACE_FIRSTSLOT+1] = (void *)PySurface_New;
 }

src/freetype/ft_font.c

 ftfont_export_capi(void **capi)
 {
     capi[PYGAME_FREETYPE_FONT_FIRSTSLOT + 0] = &PyFreeTypeFont_Type;
-    capi[PYGAME_FREETYPE_FONT_FIRSTSLOT + 1] = &PyFreeTypeFont_New;
+    capi[PYGAME_FREETYPE_FONT_FIRSTSLOT + 1] = (void *)PyFreeTypeFont_New;
 }
 mask_export_capi (void **capi)
 {
     capi[PYGAME_MASK_FIRSTSLOT+0] = &PyMask_Type;
-    capi[PYGAME_MASK_FIRSTSLOT+1] = &PyMask_New;
+    capi[PYGAME_MASK_FIRSTSLOT+1] = (void *)PyMask_New;
 }

src/math/mathmod.c

     ADD_OBJ_OR_FAIL (mod, "Vector3", PyVector3_Type, fail);
 
     /* Export C API */
-    c_api[PYGAME_MATH_FIRSTSLOT] = &VectorCoordsFromObj;
+    c_api[PYGAME_MATH_FIRSTSLOT] = (void *)VectorCoordsFromObj;
 
     vector_export_capi (c_api);
     vector2_export_capi (c_api);

src/math/vector.c

 vector_export_capi (void **capi)
 {
     capi[PYGAME_MATHVECTOR_FIRSTSLOT] = &PyVector_Type;
-    capi[PYGAME_MATHVECTOR_FIRSTSLOT+1] = &PyVector_New;
-    capi[PYGAME_MATHVECTOR_FIRSTSLOT+2] = &PyVector_NewFromSeq;
-    capi[PYGAME_MATHVECTOR_FIRSTSLOT+3] = &PyVector_NewSpecialized;
+    capi[PYGAME_MATHVECTOR_FIRSTSLOT+1] = (void *)PyVector_New;
+    capi[PYGAME_MATHVECTOR_FIRSTSLOT+2] = (void *)PyVector_NewFromSeq;
+    capi[PYGAME_MATHVECTOR_FIRSTSLOT+3] = (void *)PyVector_NewSpecialized;
 }

src/math/vector2.c

 vector2_export_capi (void **capi)
 {
     capi[PYGAME_MATHVECTOR2_FIRSTSLOT] = &PyVector2_Type;
-    capi[PYGAME_MATHVECTOR2_FIRSTSLOT+1] = &PyVector2_New;
+    capi[PYGAME_MATHVECTOR2_FIRSTSLOT+1] = (void *)PyVector2_New;
 }

src/math/vector3.c

 vector3_export_capi (void **capi)
 {
     capi[PYGAME_MATHVECTOR3_FIRSTSLOT] = &PyVector3_Type;
-    capi[PYGAME_MATHVECTOR3_FIRSTSLOT+1] = &PyVector3_New;
+    capi[PYGAME_MATHVECTOR3_FIRSTSLOT+1] = (void *)PyVector3_New;
 }

src/openal/device.c

 device_export_capi (void **capi)
 {
     capi[PYGAME_OPENALDEVICE_FIRSTSLOT] = &PyDevice_Type;
-    capi[PYGAME_OPENALDEVICE_FIRSTSLOT+1] = PyDevice_New;
+    capi[PYGAME_OPENALDEVICE_FIRSTSLOT+1] = (void *)PyDevice_New;
 }

src/openal/pgopenal.h

 static void **PyGameOpenAL_C_API;
 #endif
 
-#define PYGAME_OPENAL_SLOTS (PYGAME_OPENAL_FIRSTSLOT + PYGAME_OPENAL_NUMSLOTS)
+#define PYGAME_OPENAL_SLOTS \
+    (PYGAME_OPENALCONTEXT_FIRSTSLOT + PYGAME_OPENALCONTEXT_NUMSLOTS)
 #define PYGAME_OPENAL_ENTRY "_PYGAME_OPENAL_CAPI"
 
 static int
 cdrom_export_capi (void **capi)
 {
     capi[PYGAME_SDLCDROM_FIRSTSLOT] = &PyCD_Type;
-    capi[PYGAME_SDLCDROM_FIRSTSLOT+1] = PyCD_New;
+    capi[PYGAME_SDLCDROM_FIRSTSLOT+1] = (void *)PyCD_New;
 }

src/sdl/cdtrack.c

 cdtrack_export_capi (void **capi)
 {
     capi[PYGAME_SDLCDTRACK_FIRSTSLOT] = &PyCDTrack_Type;
-    capi[PYGAME_SDLCDTRACK_FIRSTSLOT+1] = PyCDTrack_New;
+    capi[PYGAME_SDLCDTRACK_FIRSTSLOT+1] = (void *)PyCDTrack_New;
 }
 
 event_export_capi (void **capi)
 {
     capi[PYGAME_SDLEVENT_FIRSTSLOT] = &PyEvent_Type;
-    capi[PYGAME_SDLEVENT_FIRSTSLOT+1] = PyEvent_New;
-    capi[PYGAME_SDLEVENT_FIRSTSLOT+2] = PyEvent_SDLEventFromEvent;
+    capi[PYGAME_SDLEVENT_FIRSTSLOT+1] = (void *)PyEvent_New;
+    capi[PYGAME_SDLEVENT_FIRSTSLOT+2] = (void *)PyEvent_SDLEventFromEvent;
 }

src/sdl/joystick.c

 joystick_export_capi (void **capi)
 {
     capi[PYGAME_SDLJOYSTICK_FIRSTSLOT] = &PyJoystick_Type;
-    capi[PYGAME_SDLJOYSTICK_FIRSTSLOT+1] = PyJoystick_New;
+    capi[PYGAME_SDLJOYSTICK_FIRSTSLOT+1] = (void *)PyJoystick_New;
 }

src/sdl/overlay.c

 overlay_export_capi (void **capi)
 {
     capi[PYGAME_SDLOVERLAY_FIRSTSLOT] = &PyOverlay_Type;
-    capi[PYGAME_SDLOVERLAY_FIRSTSLOT+1] = PyOverlay_New;
-    capi[PYGAME_SDLOVERLAY_FIRSTSLOT+2] = PyOverlay_AddRefLock;
-    capi[PYGAME_SDLOVERLAY_FIRSTSLOT+3] = PyOverlay_RemoveRefLock;
+    capi[PYGAME_SDLOVERLAY_FIRSTSLOT+1] = (void *)PyOverlay_New;
+    capi[PYGAME_SDLOVERLAY_FIRSTSLOT+2] = (void *)PyOverlay_AddRefLock;
+    capi[PYGAME_SDLOVERLAY_FIRSTSLOT+3] = (void *)PyOverlay_RemoveRefLock;
 }

src/sdl/pixelformat.c

 pixelformat_export_capi (void **capi)
 {
     capi[PYGAME_SDLPXFMT_FIRSTSLOT] = &PyPixelFormat_Type;
-    capi[PYGAME_SDLPXFMT_FIRSTSLOT+1] = PyPixelFormat_New;
-    capi[PYGAME_SDLPXFMT_FIRSTSLOT+2] = PyPixelFormat_NewFromSDLPixelFormat;
+    capi[PYGAME_SDLPXFMT_FIRSTSLOT+1] = (void *)PyPixelFormat_New;
+    capi[PYGAME_SDLPXFMT_FIRSTSLOT+2] =
+        (void *)PyPixelFormat_NewFromSDLPixelFormat;
 }

src/sdl/rwopsmod.c

     if (!mod)
         goto fail;
 
-    c_api[PYGAME_SDLRWOPS_FIRSTSLOT+0] = PyRWops_NewRO;
-    c_api[PYGAME_SDLRWOPS_FIRSTSLOT+1] = PyRWops_NewRW;
-    c_api[PYGAME_SDLRWOPS_FIRSTSLOT+2] = PyRWops_Close;
-    c_api[PYGAME_SDLRWOPS_FIRSTSLOT+3] = PyRWops_NewRO_Threaded;
-    c_api[PYGAME_SDLRWOPS_FIRSTSLOT+4] = PyRWops_NewRW_Threaded;
+    c_api[PYGAME_SDLRWOPS_FIRSTSLOT+0] = (void *)PyRWops_NewRO;
+    c_api[PYGAME_SDLRWOPS_FIRSTSLOT+1] = (void *)PyRWops_NewRW;
+    c_api[PYGAME_SDLRWOPS_FIRSTSLOT+2] = (void *)PyRWops_Close;
+    c_api[PYGAME_SDLRWOPS_FIRSTSLOT+3] = (void *)PyRWops_NewRO_Threaded;
+    c_api[PYGAME_SDLRWOPS_FIRSTSLOT+4] = (void *)PyRWops_NewRW_Threaded;
 
     c_api_obj = PyCObject_FromVoidPtr ((void *) c_api, NULL);
     if (c_api_obj)
     SDL_MOD_STATE(mod)->initialized = 0;
 
     /* Export C API */
-    c_api[PYGAME_SDLBASE_FIRSTSLOT] = Uint8FromObj;
-    c_api[PYGAME_SDLBASE_FIRSTSLOT+1] = Uint16FromObj;
-    c_api[PYGAME_SDLBASE_FIRSTSLOT+2] = Sint16FromObj;
-    c_api[PYGAME_SDLBASE_FIRSTSLOT+3] = Uint32FromObj;
-    c_api[PYGAME_SDLBASE_FIRSTSLOT+4] = Uint8FromSeqIndex;
-    c_api[PYGAME_SDLBASE_FIRSTSLOT+5] = Uint16FromSeqIndex;
-    c_api[PYGAME_SDLBASE_FIRSTSLOT+6] = Sint16FromSeqIndex;
-    c_api[PYGAME_SDLBASE_FIRSTSLOT+7] = Uint32FromSeqIndex;
-    c_api[PYGAME_SDLBASE_FIRSTSLOT+8] = IsValidRect;
-    c_api[PYGAME_SDLBASE_FIRSTSLOT+9] = SDLRectFromRect;
+    c_api[PYGAME_SDLBASE_FIRSTSLOT] = (void *)Uint8FromObj;
+    c_api[PYGAME_SDLBASE_FIRSTSLOT+1] = (void *)Uint16FromObj;
+    c_api[PYGAME_SDLBASE_FIRSTSLOT+2] = (void *)Sint16FromObj;
+    c_api[PYGAME_SDLBASE_FIRSTSLOT+3] = (void *)Uint32FromObj;
+    c_api[PYGAME_SDLBASE_FIRSTSLOT+4] = (void *)Uint8FromSeqIndex;
+    c_api[PYGAME_SDLBASE_FIRSTSLOT+5] = (void *)Uint16FromSeqIndex;
+    c_api[PYGAME_SDLBASE_FIRSTSLOT+6] = (void *)Sint16FromSeqIndex;
+    c_api[PYGAME_SDLBASE_FIRSTSLOT+7] = (void *)Uint32FromSeqIndex;
+    c_api[PYGAME_SDLBASE_FIRSTSLOT+8] = (void *)IsValidRect;
+    c_api[PYGAME_SDLBASE_FIRSTSLOT+9] = (void *)SDLRectFromRect;
    
     c_api_obj = PyCObject_FromVoidPtr ((void *) c_api, NULL);
     if (c_api_obj)

src/sdl/surface.c

 surface_export_capi (void **capi)
 {
     capi[PYGAME_SDLSURFACE_FIRSTSLOT] = &PySDLSurface_Type;
-    capi[PYGAME_SDLSURFACE_FIRSTSLOT+1] = PySDLSurface_New;
-    capi[PYGAME_SDLSURFACE_FIRSTSLOT+2] = PySDLSurface_NewFromSDLSurface;
-    capi[PYGAME_SDLSURFACE_FIRSTSLOT+3] = PySDLSurface_Copy;
-    capi[PYGAME_SDLSURFACE_FIRSTSLOT+4] = PySDLSurface_AddRefLock;
-    capi[PYGAME_SDLSURFACE_FIRSTSLOT+5] = PySDLSurface_RemoveRefLock;
-    capi[PYGAME_SDLSURFACE_FIRSTSLOT+6] = PySDLSurface_AcquireLockObj;
+    capi[PYGAME_SDLSURFACE_FIRSTSLOT+1] = (void *)PySDLSurface_New;
+    capi[PYGAME_SDLSURFACE_FIRSTSLOT+2] =
+        (void *)PySDLSurface_NewFromSDLSurface;
+    capi[PYGAME_SDLSURFACE_FIRSTSLOT+3] = (void *)PySDLSurface_Copy;
+    capi[PYGAME_SDLSURFACE_FIRSTSLOT+4] = (void *)PySDLSurface_AddRefLock;
+    capi[PYGAME_SDLSURFACE_FIRSTSLOT+5] = (void *)PySDLSurface_RemoveRefLock;
+    capi[PYGAME_SDLSURFACE_FIRSTSLOT+6] = (void *)PySDLSurface_AcquireLockObj;
 }

src/sdl/videomod.c

     ADD_OBJ_OR_FAIL (mod, "Surface", PySDLSurface_Type, fail);
     ADD_OBJ_OR_FAIL (mod, "Overlay", PyOverlay_Type, fail);
     
-    c_api[PYGAME_SDLVIDEO_FIRSTSLOT+0] = SDLColorFromObj;
+    c_api[PYGAME_SDLVIDEO_FIRSTSLOT+0] = (void *)SDLColorFromObj;
 
     pixelformat_export_capi (c_api);
     surface_export_capi (c_api);
     PyDict_SetItemString (dict, "display", tmp);
     Py_DECREF (tmp);
 
-    tmp = PyCObject_FromVoidPtr (info.info.x11.lock_func, NULL);
+    tmp = PyCObject_FromVoidPtr ((void *)info.info.x11.lock_func, NULL);
     PyDict_SetItemString (dict, "lock_func", tmp);
     Py_DECREF (tmp);
 
-    tmp = PyCObject_FromVoidPtr (info.info.x11.unlock_func, NULL);
+    tmp = PyCObject_FromVoidPtr ((void *)info.info.x11.unlock_func, NULL);
     PyDict_SetItemString (dict, "unlock_func", tmp);
     Py_DECREF (tmp);
 

src/sdlext/pixelarray.c

 pixelarray_export_capi (void **capi)
 {
     capi[PYGAME_SDLEXTPIXELARRAY_FIRSTSLOT] = &PyPixelArray_Type;
-    capi[PYGAME_SDLEXTPIXELARRAY_FIRSTSLOT+1] = PyPixelArray_New;
+    capi[PYGAME_SDLEXTPIXELARRAY_FIRSTSLOT+1] = (void *)PyPixelArray_New;
 }
 

src/sdlext/scrap_x11.c

         p.encoding = sel_type;
         p.format = sel_format;
         p.nitems = nbytes;
-        p.value = (*data);
+        p.value = (unsigned char*)(*data);
 
         status = XmbTextPropertyToTextList (_sdldisplay, &p, &list, &count);
         if (status == XLocaleNotSupported || status == XConverterNotFound)

src/sdlgfx/fpsmanager.c

 fps_export_capi (void **capi)
 {
     capi[PYGAME_SDLGFXFPS_FIRSTSLOT] = &PyFPSmanager_Type;
-    capi[PYGAME_SDLGFXFPS_FIRSTSLOT+1] = &PyFPSmanager_New;
+    capi[PYGAME_SDLGFXFPS_FIRSTSLOT+1] = (void *)PyFPSmanager_New;
 }

src/sdlmixer/channel.c

 channel_export_capi (void **capi)
 {
     capi[PYGAME_SDLMIXERCHANNEL_FIRSTSLOT] = &PyChannel_Type;
-    capi[PYGAME_SDLMIXERCHANNEL_FIRSTSLOT+1] = &PyChannel_New;
-    capi[PYGAME_SDLMIXERCHANNEL_FIRSTSLOT+2] = &PyChannel_NewFromIndex;
+    capi[PYGAME_SDLMIXERCHANNEL_FIRSTSLOT+1] = (void *)PyChannel_New;
+    capi[PYGAME_SDLMIXERCHANNEL_FIRSTSLOT+2] = (void *)PyChannel_NewFromIndex;
 }

src/sdlmixer/chunk.c

 chunk_export_capi (void **capi)
 {
     capi[PYGAME_SDLMIXERCHUNK_FIRSTSLOT] = &PyChunk_Type;
-    capi[PYGAME_SDLMIXERCHUNK_FIRSTSLOT+1] = &PyChunk_New;
-    capi[PYGAME_SDLMIXERCHUNK_FIRSTSLOT+2] = &PyChunk_NewFromMixerChunk;
+    capi[PYGAME_SDLMIXERCHUNK_FIRSTSLOT+1] = (void *)PyChunk_New;
+    capi[PYGAME_SDLMIXERCHUNK_FIRSTSLOT+2] = (void *)PyChunk_NewFromMixerChunk;
 }

src/sdlmixer/mixermod.c

 
     /* Export C API */
     chunk_export_capi (c_api);
+    channel_export_capi (c_api);
+    music_export_capi (c_api);
 
     c_api_obj = PyCObject_FromVoidPtr ((void *) c_api, NULL);
     if (c_api_obj)

src/sdlmixer/music.c

 music_export_capi (void **capi)
 {
     capi[PYGAME_SDLMIXERMUSIC_FIRSTSLOT] = &PyMusic_Type;
-    capi[PYGAME_SDLMIXERMUSIC_FIRSTSLOT+1] = &PyMusic_New;
+    capi[PYGAME_SDLMIXERMUSIC_FIRSTSLOT+1] = (void *)PyMusic_New;
 }

src/sdlttf/font.c

 font_export_capi (void **capi)
 {
     capi[PYGAME_SDLTTFFONT_FIRSTSLOT] = &PySDLFont_TTF_Type;
-    capi[PYGAME_SDLTTFFONT_FIRSTSLOT+1] = &PySDLFont_TTF_New;
+    capi[PYGAME_SDLTTFFONT_FIRSTSLOT+1] = (void *)PySDLFont_TTF_New;
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.