mirror of
https://github.com/python/cpython.git
synced 2025-08-24 02:35:59 +00:00
gh-106572: Convert PyObject_DelAttr() to a function (#106611)
* Convert PyObject_DelAttr() and PyObject_DelAttrString() macros to functions. * Add PyObject_DelAttr() and PyObject_DelAttrString() functions to the stable ABI. * Replace PyObject_SetAttr(obj, name, NULL) with PyObject_DelAttr(obj, name).
This commit is contained in:
parent
e6379f72cb
commit
1f2921b72c
12 changed files with 33 additions and 8 deletions
|
@ -1240,7 +1240,7 @@ dummy_func(
|
|||
|
||||
inst(DELETE_ATTR, (owner --)) {
|
||||
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
|
||||
int err = PyObject_SetAttr(owner, name, (PyObject *)NULL);
|
||||
int err = PyObject_DelAttr(owner, name);
|
||||
DECREF_INPUTS();
|
||||
ERROR_IF(err, error);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue