@@ -27,7 +27,7 @@ the definition of all other Python objects.
2727 object. In a normal "release" build, it contains only the object's
2828 reference count and a pointer to the corresponding type object.
2929 Nothing is actually declared to be a :c:type: `PyObject `, but every pointer
30- to a Python object can be cast to a :c:type : `PyObject* `. Access to the
30+ to a Python object can be cast to a :c:expr : `PyObject* `. Access to the
3131 members must be done by using the macros :c:macro: `Py_REFCNT ` and
3232 :c:macro: `Py_TYPE `.
3333
@@ -184,7 +184,7 @@ Implementing functions and methods
184184.. c :type :: PyCFunction
185185
186186 Type of the functions used to implement most Python callables in C.
187- Functions of this type take two :c:type : `PyObject* ` parameters and return
187+ Functions of this type take two :c:expr : `PyObject* ` parameters and return
188188 one such value. If the return value is ``NULL ``, an exception shall have
189189 been set. If not ``NULL ``, the return value is interpreted as the return
190190 value of the function as exposed in Python. The function must return a new
@@ -263,10 +263,10 @@ Implementing functions and methods
263263 +------------------+---------------+-------------------------------+
264264
265265The :attr: `ml_meth ` is a C function pointer. The functions may be of different
266- types, but they always return :c:type : `PyObject* `. If the function is not of
266+ types, but they always return :c:expr : `PyObject* `. If the function is not of
267267the :c:type: `PyCFunction `, the compiler will require a cast in the method table.
268268Even though :c:type: `PyCFunction ` defines the first parameter as
269- :c:type : `PyObject* `, it is common that the method implementation uses the
269+ :c:expr : `PyObject* `, it is common that the method implementation uses the
270270specific C type of the *self * object.
271271
272272The :attr: `ml_flags ` field is a bitfield which can include the following flags.
@@ -278,7 +278,7 @@ There are these calling conventions:
278278.. data :: METH_VARARGS
279279
280280 This is the typical calling convention, where the methods have the type
281- :c:type: `PyCFunction `. The function expects two :c:type : `PyObject* ` values.
281+ :c:type: `PyCFunction `. The function expects two :c:expr : `PyObject* ` values.
282282 The first one is the *self * object for methods; for module functions, it is
283283 the module object. The second parameter (often called *args *) is a tuple
284284 object representing all arguments. This parameter is typically processed
@@ -299,7 +299,7 @@ There are these calling conventions:
299299 Fast calling convention supporting only positional arguments.
300300 The methods have the type :c:type:`_PyCFunctionFast`.
301301 The first parameter is *self*, the second parameter is a C array
302- of :c:type :`PyObject*` values indicating the arguments and the third
302+ of :c:expr :`PyObject*` values indicating the arguments and the third
303303 parameter is the number of arguments (the length of the array).
304304
305305 .. versionadded:: 3.7
@@ -315,7 +315,7 @@ There are these calling conventions:
315315 with methods of type :c:type:`_PyCFunctionFastWithKeywords`.
316316 Keyword arguments are passed the same way as in the
317317 :ref:`vectorcall protocol <vectorcall>`:
318- there is an additional fourth :c:type :`PyObject*` parameter
318+ there is an additional fourth :c:expr :`PyObject*` parameter
319319 which is a tuple representing the names of the keyword arguments
320320 (which are guaranteed to be strings)
321321 or possibly ``NULL`` if there are no keywords. The values of the keyword
@@ -354,7 +354,7 @@ There are these calling conventions:
354354 Methods with a single object argument can be listed with the :const :`METH_O`
355355 flag, instead of invoking :c:func:`PyArg_ParseTuple` with a ``"O"`` argument.
356356 They have the type :c:type:`PyCFunction`, with the *self* parameter, and a
357- :c:type :`PyObject*` parameter representing the single argument.
357+ :c:expr :`PyObject*` parameter representing the single argument.
358358
359359
360360These two constants are not used to indicate the calling convention but the
@@ -522,15 +522,15 @@ Accessing attributes of extension types
522522 | | | getter and setter |
523523 +-------------+------------------+-----------------------------------+
524524
525- The ``get `` function takes one :c:type : `PyObject* ` parameter (the
525+ The ``get `` function takes one :c:expr : `PyObject* ` parameter (the
526526 instance) and a function pointer (the associated ``closure ``)::
527527
528528 typedef PyObject *(*getter)(PyObject *, void *);
529529
530530 It should return a new reference on success or ``NULL `` with a set exception
531531 on failure.
532532
533- ``set `` functions take two :c:type : `PyObject* ` parameters (the instance and
533+ ``set `` functions take two :c:expr : `PyObject* ` parameters (the instance and
534534 the value to be set) and a function pointer (the associated ``closure ``)::
535535
536536 typedef int (*setter)(PyObject *, PyObject *, void *);
0 commit comments