BGE Py API using python3 c/api calls. include bpy_compat.h to support py2.x

This commit is contained in:
Campbell Barton
2009-06-29 02:25:54 +00:00
parent bb1f24ac44
commit c50bbe5ae7
66 changed files with 317 additions and 325 deletions

View File

@@ -167,13 +167,13 @@ PyObject * Video_getRepeat (PyImage * self, void * closure)
int Video_setRepeat (PyImage * self, PyObject * value, void * closure)
{
// check validity of parameter
if (value == NULL || !PyInt_Check(value))
if (value == NULL || !PyLong_Check(value))
{
PyErr_SetString(PyExc_TypeError, "The value must be an int");
return -1;
}
// set repeat
getVideo(self)->setRepeat(int(PyInt_AsLong(value)));
getVideo(self)->setRepeat(int(PyLong_AsSsize_t(value)));
// success
return 0;
}