mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-130123: Make __new__ wrapper be deferred (#130124)
Make __new__ wrapper be deferred
This commit is contained in:
parent
e65e9f9062
commit
5a586c3e81
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue