fix 2.6 build
This commit is contained in:
@ -118,7 +118,11 @@ PyMODINIT_FUNC init_dbbase(void)
|
|||||||
if(!mod)
|
if(!mod)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
#if PY_MAJOR_VERSION >= 3 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION>=7)
|
||||||
obj = PyCapsule_New(pdbbase, "pdbbase", NULL);
|
obj = PyCapsule_New(pdbbase, "pdbbase", NULL);
|
||||||
|
#else
|
||||||
|
obj = PyCObject_FromVoidPtrAndDesc(pdbbase, "pdbbase", NULL);
|
||||||
|
#endif
|
||||||
if(!obj)
|
if(!obj)
|
||||||
goto fail;
|
goto fail;
|
||||||
PyModule_AddObject(mod, "pdbbase", obj);
|
PyModule_AddObject(mod, "pdbbase", obj);
|
||||||
|
Reference in New Issue
Block a user