mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-115618: Remove improper Py_XDECREFs in property methods (GH-115619)
This commit is contained in:
parent
aba37d451f
commit
090dd21ab9
3 changed files with 21 additions and 3 deletions
|
|
@ -1730,15 +1730,12 @@ property_copy(PyObject *old, PyObject *get, PyObject *set, PyObject *del)
|
|||
return NULL;
|
||||
|
||||
if (get == NULL || get == Py_None) {
|
||||
Py_XDECREF(get);
|
||||
get = pold->prop_get ? pold->prop_get : Py_None;
|
||||
}
|
||||
if (set == NULL || set == Py_None) {
|
||||
Py_XDECREF(set);
|
||||
set = pold->prop_set ? pold->prop_set : Py_None;
|
||||
}
|
||||
if (del == NULL || del == Py_None) {
|
||||
Py_XDECREF(del);
|
||||
del = pold->prop_del ? pold->prop_del : Py_None;
|
||||
}
|
||||
if (pold->getter_doc && get != Py_None) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue