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:
@@ -942,6 +942,12 @@ PyObject_SetAttrString(PyObject *v, const char *name, PyObject *w)
|
||||
return res;
|
||||
}
|
||||
|
||||
int
|
||||
PyObject_DelAttrString(PyObject *v, const char *name)
|
||||
{
|
||||
return PyObject_SetAttrString(v, name, NULL);
|
||||
}
|
||||
|
||||
int
|
||||
_PyObject_IsAbstract(PyObject *obj)
|
||||
{
|
||||
@@ -1185,6 +1191,12 @@ PyObject_SetAttr(PyObject *v, PyObject *name, PyObject *value)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
PyObject_DelAttr(PyObject *v, PyObject *name)
|
||||
{
|
||||
return PyObject_SetAttr(v, name, NULL);
|
||||
}
|
||||
|
||||
PyObject **
|
||||
_PyObject_ComputedDictPointer(PyObject *obj)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user