Merge branch 'release/1.10.x'
This commit is contained in:
commit
d8e9afb3f8
|
|
@ -364,7 +364,7 @@ __getattribute__(PyObject *self, PyObject *attr) const {
|
|||
// We consult the instance dict first, since the user may have overridden a
|
||||
// method or something.
|
||||
PyObject *item;
|
||||
if (PyDict_GetItemRef(__dict__, attr, &item) > 0) {
|
||||
if (PyDict_GetItemRef(__dict__, attr, &item) != 0) {
|
||||
return item;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,10 +56,9 @@ PyObject *Extension<NodePath>::
|
|||
__deepcopy__(PyObject *self, PyObject *memo) const {
|
||||
extern struct Dtool_PyTypedObject Dtool_NodePath;
|
||||
|
||||
// Borrowed reference.
|
||||
PyObject *dupe;
|
||||
if (PyDict_GetItemRef(memo, self, &dupe) > 0) {
|
||||
// Already in the memo dictionary.
|
||||
if (PyDict_GetItemRef(memo, self, &dupe) != 0) {
|
||||
// Already in the memo dictionary (or an error happened).
|
||||
return dupe;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,10 +46,9 @@ PyObject *Extension<PandaNode>::
|
|||
__deepcopy__(PyObject *self, PyObject *memo) const {
|
||||
extern struct Dtool_PyTypedObject Dtool_PandaNode;
|
||||
|
||||
// Borrowed reference.
|
||||
PyObject *dupe;
|
||||
if (PyDict_GetItemRef(memo, self, &dupe) > 0) {
|
||||
// Already in the memo dictionary.
|
||||
if (PyDict_GetItemRef(memo, self, &dupe) != 0) {
|
||||
// Already in the memo dictionary (or an error happened).
|
||||
return dupe;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue