Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b355304

Browse files
committed
Document PyCFunctionWithKeywords, add comment for PEP 3123.
1 parent a6f5278 commit b355304

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

Doc/c-api/newtypes.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ definition of all other Python objects.
139139
These macros are used in the definition of :ctype:`PyObject` and
140140
:ctype:`PyVarObject`:
141141

142+
.. XXX need to document PEP 3123 changes here
142143
143144
.. cmacro:: PyObject_HEAD
144145

@@ -171,7 +172,7 @@ These macros are used in the definition of :ctype:`PyObject` and
171172
Note that :cmacro:`PyObject_HEAD` is part of the expansion, and that its own
172173
expansion varies depending on the definition of :cmacro:`Py_TRACE_REFS`.
173174

174-
PyObject_HEAD_INIT
175+
.. cmacro:: PyObject_HEAD_INIT
175176

176177

177178
.. ctype:: PyCFunction
@@ -183,6 +184,14 @@ PyObject_HEAD_INIT
183184
in Python. The function must return a new reference.
184185

185186

187+
.. ctype:: PyCFunctionWithKeywords
188+
189+
Type of the functions used to implement Python callables in C that take
190+
keyword arguments: they take three :ctype:`PyObject\*` parameters and return
191+
one such value. See :ctype:`PyCFunction` above for the meaning of the return
192+
value.
193+
194+
186195
.. ctype:: PyMethodDef
187196

188197
Structure used to describe a method of an extension type. This structure has

0 commit comments

Comments
 (0)