Skip to content

Commit 4e205b7

Browse files
alexchandelvstinner
authored andcommitted
Fix quoted signature of setattrofunc (GH-17251)
setattrofunc returns `int`, not `PyObject *`.
1 parent 138e7bb commit 4e205b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/c-api/typeobj.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ and :c:type:`PyType_Type` effectively act as defaults.)
955955

956956
The signature is the same as for :c:func:`PyObject_SetAttr`::
957957

958-
PyObject *tp_setattro(PyObject *self, PyObject *attr, PyObject *value);
958+
int tp_setattro(PyObject *self, PyObject *attr, PyObject *value);
959959

960960
In addition, setting *value* to ``NULL`` to delete an attribute must be
961961
supported. It is usually convenient to set this field to

0 commit comments

Comments
 (0)