Merge branch 'release/1.10.x'

This commit is contained in:
rdb 2025-08-28 11:49:12 +02:00
commit d8e9afb3f8
3 changed files with 5 additions and 7 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}