mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
fix oops
This commit is contained in:
parent
eb6eeb6d02
commit
0925d9265f
@ -679,13 +679,14 @@ PyObject *make_list_for_item(PyObject *self, const char *num_name,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Py_ssize_t num_elements;
|
||||||
#if PY_MAJOR_VERSION >= 3
|
#if PY_MAJOR_VERSION >= 3
|
||||||
Py_ssize_t num_elements = PyLong_AsSsize_t(num_result);
|
num_elements = PyLong_AsSsize_t(num_result);
|
||||||
#else
|
#else
|
||||||
if (PyLong_Check(num_result)) {
|
if (PyLong_Check(num_result)) {
|
||||||
Py_ssize_t num_elements = PyLong_AsSsize_t(num_result);
|
num_elements = PyLong_AsSsize_t(num_result);
|
||||||
} else {
|
} else {
|
||||||
Py_ssize_t num_elements = PyInt_AsSsize_t(num_result);
|
num_elements = PyInt_AsSsize_t(num_result);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
Py_DECREF(num_result);
|
Py_DECREF(num_result);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user