fix pybullet cmake compilation

This commit is contained in:
Erwin Coumans
2016-05-18 15:07:42 -07:00
parent a395ddcb06
commit cdd6954ada
2 changed files with 52 additions and 3 deletions

View File

@@ -329,10 +329,16 @@ initpybullet(void)
SpamMethods, "Python bindings for Bullet");
#endif
#if PY_MAJOR_VERSION >= 3
if (m == NULL)
return m;
#else
if (m == NULL)
return;
#endif
PyModule_AddIntConstant (m, "SHARED_MEMORY", eCONNECT_SHARED_MEMORY); // user read
PyModule_AddIntConstant (m, "SHARED_MEMORY", eCONNECT_SHARED_MEMORY); // user read
PyModule_AddIntConstant (m, "DIRECT", eCONNECT_DIRECT); // user read
PyModule_AddIntConstant (m, "GUI", eCONNECT_GUI); // user read