https://github.com/python/cpython/commit/5a586c3e81ab53bb1f6c20a4c80b4eb69d429410
commit: 5a586c3e81ab53bb1f6c20a4c80b4eb69d429410
branch: main
author: Dino Viehland <[email protected]>
committer: DinoV <[email protected]>
date: 2025-02-14T12:50:54-08:00
summary:
gh-130123: Make __new__ wrapper be deferred (#130124)
Make __new__ wrapper be deferred
files:
M Objects/typeobject.c
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 818a00708b5d3d..1fa1220aeec648 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -9564,6 +9564,7 @@ add_tp_new_wrapper(PyTypeObject *type)
if (func == NULL) {
return -1;
}
+ _PyObject_SetDeferredRefcount(func);
r = PyDict_SetItem(dict, &_Py_ID(__new__), func);
Py_DECREF(func);
return r;
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]