]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39973: Fix the docs for PyObject_GenericSetDict() (GH-19026)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 17 Mar 2020 08:25:50 +0000 (01:25 -0700)
committerGitHub <noreply@github.com>
Tue, 17 Mar 2020 08:25:50 +0000 (01:25 -0700)
PyObject_GenericSetDict() takes three arguments, not two.
(cherry picked from commit a45b695b9fcfbbb0a087222abc5c8d691a7d2770)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Doc/c-api/object.rst
Doc/data/refcounts.dat

index d81dc938e4f96c306c374750bc3d699400b65532..179efc4286f86c48b7fbcef7b8b5f0dedd0766d9 100644 (file)
@@ -128,7 +128,7 @@ Object Protocol
    .. versionadded:: 3.3
 
 
-.. c:function:: int PyObject_GenericSetDict(PyObject *o, void *context)
+.. c:function:: int PyObject_GenericSetDict(PyObject *o, PyObject *value, void *context)
 
    A generic implementation for the setter of a ``__dict__`` descriptor. This
    implementation does not allow the dictionary to be deleted.
index ec8094ef24863b20b94a95d46a4cc535646d9d39..39061e2c26f5665d9676e198cd23ea4e9f2e61a2 100644 (file)
@@ -1655,7 +1655,8 @@ PyObject_GenericSetAttr:PyObject*:name:0:
 PyObject_GenericSetAttr:PyObject*:value:+1:
 
 PyObject_GenericSetDict:int:::
-PyObject_GenericSetDict:PyObject*:o:+1:
+PyObject_GenericSetDict:PyObject*:o:0:
+PyObject_GenericSetDict:PyObject*:value:+1:
 PyObject_GenericSetDict:void*:context::
 
 PyObject_GetAttr:PyObject*::+1: