|
@@ -28,7 +28,7 @@ int Extension<OdeUtil>::
|
|
|
collide2(const OdeGeom &geom1, const OdeGeom &geom2, PyObject* arg, PyObject* callback) {
|
|
collide2(const OdeGeom &geom1, const OdeGeom &geom2, PyObject* arg, PyObject* callback) {
|
|
|
nassertr(callback != nullptr, -1);
|
|
nassertr(callback != nullptr, -1);
|
|
|
if (!PyCallable_Check(callback)) {
|
|
if (!PyCallable_Check(callback)) {
|
|
|
- PyErr_Format(PyExc_TypeError, "'%s' object is not callable", callback->ob_type->tp_name);
|
|
|
|
|
|
|
+ PyErr_Format(PyExc_TypeError, "'%s' object is not callable", Py_TYPE(callback)->tp_name);
|
|
|
return -1;
|
|
return -1;
|
|
|
} else {
|
|
} else {
|
|
|
_python_callback = (PyObject*) callback;
|
|
_python_callback = (PyObject*) callback;
|