Skip to content

Commit b195a1c

Browse files
authored
Merge pull request #1 from encukou/fix-wrapper-decl
2 parents 9e93f02 + f7927d3 commit b195a1c

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

Doc/c-api/module.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ functions to avoid reference leaks.
415415
416416
To retrieve the state from a given module, use the following functions:
417417
418-
.. c:function:: void* PyModule_GetState(PyObject *mod)
418+
.. c:function:: void* PyModule_GetState(PyObject *module)
419419
420420
Return the "state" of the module, that is, a pointer to the block of memory
421421
allocated at module creation time, or ``NULL``. See
@@ -426,9 +426,9 @@ To retrieve the state from a given module, use the following functions:
426426
module state.
427427
428428
429-
.. c:function:: int PyModule_GetStateSize(PyObject *mod, Py_ssize_t *result)
429+
.. c:function:: int PyModule_GetStateSize(PyObject *module, Py_ssize_t *result)
430430
431-
Set *\*result* to the size of the state for the module *mod*, as specified
431+
Set *\*result* to the size of the state for the module *module*, as specified
432432
using :c:macro:`Py_mod_state_size` (or :c:member:`PyModuleDef.m_size`),
433433
and return 0.
434434
@@ -549,10 +549,10 @@ This means that if you have a module object, but you are not sure if it
549549
550550
.. code-block:: c
551551
552-
PyObject *mod = <the module in question>
552+
PyObject *module = <the module in question>
553553
554554
void *module_token;
555-
if (PyModule_GetToken(mod, &module_token) < 0) {
555+
if (PyModule_GetToken(module, &module_token) < 0) {
556556
return NULL;
557557
}
558558
if (module_token != your_token) {
@@ -595,9 +595,9 @@ A module's token -- and the *your_token* value to use in the above code -- is:
595595
596596
.. versionadded:: 3.15
597597
598-
.. c:function:: int PyModule_GetToken(PyObject *mod, void** result)
598+
.. c:function:: int PyModule_GetToken(PyObject *module, void** result)
599599
600-
Set *\*result* to the module token for the module *mod* and return 0.
600+
Set *\*result* to the module token for the module *module* and return 0.
601601
602602
On error, set *\*result* to NULL, and return -1 with an exception set.
603603
@@ -643,14 +643,14 @@ rather than from an extension's :ref:`export hook <extension-export-hook>`.
643643
644644
.. versionadded:: 3.15
645645
646-
.. c:function:: int PyModule_Exec(PyObject *mod)
646+
.. c:function:: int PyModule_Exec(PyObject *module)
647647
648-
Execute the :c:data:`Py_mod_exec` slot(s) of the given module, *mod*.
648+
Execute the :c:data:`Py_mod_exec` slot(s) of the given module, *module*.
649649
650650
On success, return 0.
651651
On error, return -1 with an exception set.
652652
653-
For clarity: If *mod* has no slots, for example if it uses
653+
For clarity: If *module* has no slots, for example if it uses
654654
:ref:`legacy single-phase initialization <single-phase-initialization>`,
655655
this function does nothing and returns 0.
656656

Include/moduleobject.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ PyAPI_FUNC(int) PyUnstable_Module_SetGIL(PyObject *module, void *gil);
120120
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= _Py_PACK_VERSION(3, 15)
121121
PyAPI_FUNC(PyObject *) PyModule_FromSlotsAndSpec(const PyModuleDef_Slot *slots,
122122
PyObject *spec);
123-
PyAPI_FUNC(int) PyModule_Exec(PyObject *mod);
124-
PyAPI_FUNC(int) PyModule_GetStateSize(PyObject *mod, Py_ssize_t *result);
125-
PyAPI_FUNC(int) PyModule_GetToken(PyObject *mod, void **result);
123+
PyAPI_FUNC(int) PyModule_Exec(PyObject *module);
124+
PyAPI_FUNC(int) PyModule_GetStateSize(PyObject *module, Py_ssize_t *result);
125+
PyAPI_FUNC(int) PyModule_GetToken(PyObject *module, void **result);
126126
#endif
127127

128128
#ifndef _Py_OPAQUE_PYOBJECT

0 commit comments

Comments
 (0)