]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix quoted signature of setattrofunc (GH-17251)
authorAlex <637714+alexchandel@users.noreply.github.com>
Fri, 22 Nov 2019 13:48:14 +0000 (07:48 -0600)
committerVictor Stinner <vstinner@python.org>
Fri, 22 Nov 2019 13:48:14 +0000 (14:48 +0100)
setattrofunc returns `int`, not `PyObject *`.

Doc/c-api/typeobj.rst

index b4ffd6b41c62894e094fb974436eb072dd511ffc..7b205c044953b809a3c4ae762f58742545997ce7 100644 (file)
@@ -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