mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
parent
46c8852eed
commit
749b23a190
@ -130,7 +130,7 @@ __reduce_persist__(PyObject *self, PyObject *pickler) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Start by getting this class object.
|
// Start by getting this class object.
|
||||||
PyObject *this_class = PyObject_Type(self);
|
PyObject *this_class = (PyObject *)Py_TYPE(self);
|
||||||
if (this_class == NULL) {
|
if (this_class == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -143,7 +143,6 @@ __reduce_persist__(PyObject *self, PyObject *pickler) const {
|
|||||||
func = Extension<TypedWritable>::find_global_decode(this_class, "py_decode_NodePath_from_bam_stream_persist");
|
func = Extension<TypedWritable>::find_global_decode(this_class, "py_decode_NodePath_from_bam_stream_persist");
|
||||||
if (func == NULL) {
|
if (func == NULL) {
|
||||||
PyErr_SetString(PyExc_TypeError, "Couldn't find py_decode_NodePath_from_bam_stream_persist()");
|
PyErr_SetString(PyExc_TypeError, "Couldn't find py_decode_NodePath_from_bam_stream_persist()");
|
||||||
Py_DECREF(this_class);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,15 +152,13 @@ __reduce_persist__(PyObject *self, PyObject *pickler) const {
|
|||||||
func = Extension<TypedWritable>::find_global_decode(this_class, "py_decode_NodePath_from_bam_stream");
|
func = Extension<TypedWritable>::find_global_decode(this_class, "py_decode_NodePath_from_bam_stream");
|
||||||
if (func == NULL) {
|
if (func == NULL) {
|
||||||
PyErr_SetString(PyExc_TypeError, "Couldn't find py_decode_NodePath_from_bam_stream()");
|
PyErr_SetString(PyExc_TypeError, "Couldn't find py_decode_NodePath_from_bam_stream()");
|
||||||
Py_DECREF(this_class);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// PyTuple_SET_ITEM conveniently borrows the reference it is passed.
|
// PyTuple_SET_ITEM conveniently borrows the reference it is passed.
|
||||||
PyObject *args = PyTuple_New(2);
|
PyObject *args = PyTuple_New(1);
|
||||||
PyTuple_SET_ITEM(args, 0, this_class);
|
PyTuple_SET_ITEM(args, 0, Dtool_WrapValue(bam_stream));
|
||||||
PyTuple_SET_ITEM(args, 1, Dtool_WrapValue(bam_stream));
|
|
||||||
|
|
||||||
PyObject *tuple = PyTuple_New(2);
|
PyObject *tuple = PyTuple_New(2);
|
||||||
PyTuple_SET_ITEM(tuple, 0, func);
|
PyTuple_SET_ITEM(tuple, 0, func);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user