From: Alex <637714+alexchandel@users.noreply.github.com> Date: Fri, 22 Nov 2019 13:48:14 +0000 (-0600) Subject: Fix quoted signature of setattrofunc (GH-17251) X-Git-Tag: v3.9.0a2~139 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4e205b74f91400c0e6810e79370a99e29a28d599;p=thirdparty%2FPython%2Fcpython.git Fix quoted signature of setattrofunc (GH-17251) setattrofunc returns `int`, not `PyObject *`. --- diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst index b4ffd6b41c62..7b205c044953 100644 --- a/Doc/c-api/typeobj.rst +++ b/Doc/c-api/typeobj.rst @@ -955,7 +955,7 @@ and :c:type:`PyType_Type` effectively act as defaults.) The signature is the same as for :c:func:`PyObject_SetAttr`:: - PyObject *tp_setattro(PyObject *self, PyObject *attr, PyObject *value); + int tp_setattro(PyObject *self, PyObject *attr, PyObject *value); In addition, setting *value* to ``NULL`` to delete an attribute must be supported. It is usually convenient to set this field to