Skip to content

Commit

Permalink
gh-130123: Make __new__ wrapper be deferred (#130124)
Browse files Browse the repository at this point in the history
Make __new__ wrapper be deferred
  • Loading branch information
DinoV authored Feb 14, 2025
1 parent e65e9f9 commit 5a586c3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5a586c3

Please sign in to comment.