mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +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) {
|
if (func == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
_PyObject_SetDeferredRefcount(func);
|
||||||
r = PyDict_SetItem(dict, &_Py_ID(__new__), func);
|
r = PyDict_SetItem(dict, &_Py_ID(__new__), func);
|
||||||
Py_DECREF(func);
|
Py_DECREF(func);
|
||||||
return r;
|
return r;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue