Commits

Anonymous committed 08deb07

Silenced compiler warnings for PyModuleAddIntConstants() invocations. Unbreak pygame2.openal build

  • Participants
  • Parent commits 240dc49
  • Branches pgreloaded

Comments (0)

Files changed (10)

 	$(top_srcdir)/test/util \
 	$(top_srcdir)/lib \
 	$(top_srcdir)/lib/freetype \
+	$(top_srcdir)/lib/math \
 	$(top_srcdir)/lib/midi \
 	$(top_srcdir)/lib/sdl \
 	$(top_srcdir)/lib/sdlext \
 	$(top_srcdir)/src/base \
 	$(top_srcdir)/src/freetype \
 	$(top_srcdir)/src/mask \
+	$(top_srcdir)/src/math \
 	$(top_srcdir)/src/midi \
+	$(top_srcdir)/src/openal \
 	$(top_srcdir)/src/sdl \
 	$(top_srcdir)/src/sdlext \
 	$(top_srcdir)/src/sdlgfx \

src/freetype/ft_constants.c

 #include "pgtypes.h"
 #include "freetypebase_doc.h"
 
-#define DEC_CONST(x)  PyModule_AddIntConstant(module, #x, (int)FT_##x)
+#define DEC_CONST(x)  PyModule_AddIntConstant(module, #x, (long)FT_##x)
 
 #ifdef IS_PYTHON_3
 PyMODINIT_FUNC PyInit_constants (void)

src/openal/basemod.c

 */
 #define PYGAME_OPENALBASE_INTERNAL
 
-#include <AL.h>
+#include <AL/al.h>
 #include "pgbase.h"
 #include "pgopenal.h"
 /*#include "openalbase_doc.h"*/
         "base",
         ""/*DOC_BASE*/,
         -1,
-        _image_methods,
+        _openal_methods,
         NULL, NULL, NULL, NULL
     };
     mod = PyModule_Create (&_module);
     if (!mod)
         goto fail;
         
-    PyModule_AddObject (mod, "Device", (PyObject *) &PyDevice_Type);
+    /*PyModule_AddObject (mod, "Device", (PyObject *) &PyDevice_Type);*/
     
     if (import_pygame2_base () < 0)
         goto fail;

src/openal/constantsmod.c

 */
 #define PYGAME_OPENALCONSTANTS_INTERNAL
 
-#include <al.h>
-#include <alc.h>
-#include <alext.h>
+#include <AL/al.h>
+#include <AL/alc.h>
+#include <AL/alext.h>
 #include "pgopenal.h"
 
 /* macros used to create each constant */
-#define DEC_CONST(x)  PyModule_AddIntConstant(module, #x, (int) x)
+#define DEC_CONST(x)  PyModule_AddIntConstant(module, #x, (long) x)
 
 #ifdef IS_PYTHON_3
 PyMODINIT_FUNC PyInit_constants (void)

src/sdl/constantsmod.c

 #include "surface.h"
 
 /* macros used to create each constant */
-#define DEC_CONST(x)  PyModule_AddIntConstant(module, #x, (int) SDL_##x)
-#define DEC_CONSTK(x) PyModule_AddIntConstant(module, #x, (int) SDL##x)
-#define DEC_CONSTN(x) PyModule_AddIntConstant(module, #x, (int) x)
-#define DEC_CONSTS(x,y) PyModule_AddIntConstant(module, #x, (int) y)
+#define DEC_CONST(x)  PyModule_AddIntConstant(module, #x, (long) SDL_##x)
+#define DEC_CONSTK(x) PyModule_AddIntConstant(module, #x, (long) SDL##x)
+#define DEC_CONSTN(x) PyModule_AddIntConstant(module, #x, (long) x)
+#define DEC_CONSTS(x,y) PyModule_AddIntConstant(module, #x, (long) y)
 #define ADD_STRING_CONST(x) PyModule_AddStringConstant(module, #x, x)
 
 #ifdef IS_PYTHON_3

src/sdlext/constantsmod.c

 #include "filters.h"
 
 /* macros used to create each constant */
-#define DEC_CONSTS(x)  PyModule_AddIntConstant(module, #x, (int) #x)
+#define DEC_CONSTS(x)  PyModule_AddIntConstant(module, #x, (long) #x)
 #define ADD_STRING_CONST(x) PyModule_AddStringConstant(module, #x, x)
 
 #ifdef IS_PYTHON_3

src/sdlgfx/constantsmod.c

 #include <SDL_rotozoom.h>
 
 /* macros used to create each constant */
-#define DEC_CONSTN(x)  PyModule_AddIntConstant(module, #x, (int) x)
+#define DEC_CONSTN(x)  PyModule_AddIntConstant(module, #x, (long) x)
 
 #ifdef IS_PYTHON_3
 PyMODINIT_FUNC PyInit_constants (void)

src/sdlimage/constantsmod.c

 #include "pgsdl.h"
 
 /* macros used to create each constant */
-#define DEC_CONST(x)  PyModule_AddIntConstant(module, #x, (int) IMG_##x)
+#define DEC_CONST(x)  PyModule_AddIntConstant(module, #x, (long) IMG_##x)
 
 #ifdef IS_PYTHON_3
 PyMODINIT_FUNC PyInit_constants (void)

src/sdlmixer/constantsmod.c

 #include "pgmixer.h"
 
 /* macros used to create each constant */
-#define DEC_CONSTMIX(x)  PyModule_AddIntConstant(module, #x, (int) MIX_##x)
-#define DEC_CONST(x)  PyModule_AddIntConstant(module, #x, (int) SDL_##x)
-#define DEC_CONSTK(x) PyModule_AddIntConstant(module, #x, (int) SDL##x)
-#define DEC_CONSTN(x) PyModule_AddIntConstant(module, #x, (int) x)
-#define DEC_CONSTS(x,y) PyModule_AddIntConstant(module, #x, (int) y)
+#define DEC_CONSTMIX(x)  PyModule_AddIntConstant(module, #x, (long) MIX_##x)
+#define DEC_CONST(x)  PyModule_AddIntConstant(module, #x, (long) SDL_##x)
+#define DEC_CONSTK(x) PyModule_AddIntConstant(module, #x, (long) SDL##x)
+#define DEC_CONSTN(x) PyModule_AddIntConstant(module, #x, (long) x)
+#define DEC_CONSTS(x,y) PyModule_AddIntConstant(module, #x, (long) y)
 #define ADD_STRING_CONST(x) PyModule_AddStringConstant(module, #x, x)
 
 #ifdef IS_PYTHON_3

src/sdlttf/constantsmod.c

 #include "pgttf.h"
 
 /* macros used to create each constant */
-#define DEC_CONST(x)  PyModule_AddIntConstant(module, #x, (int) TTF_##x)
-#define DEC_CONSTS(x)  PyModule_AddIntConstant(module, #x, (int) x)
+#define DEC_CONST(x)  PyModule_AddIntConstant(module, #x, (long) TTF_##x)
+#define DEC_CONSTS(x)  PyModule_AddIntConstant(module, #x, (long) x)
 
 #ifdef IS_PYTHON_3
 PyMODINIT_FUNC PyInit_constants (void)