@@ -533,7 +533,7 @@ To retrieve the state from a given module, use the following functions:
533533
534534 Return the "state" of the module, that is, a pointer to the block of memory
535535 allocated at module creation time, or ``NULL ``. See
536- :c:macro: `Py_mod_size `.
536+ :c:macro: `Py_mod_state_size `.
537537
538538 On error, return ``NULL `` with an exception set.
539539 Use :c:func: `PyErr_Occurred ` to tell this case apart from a missing
@@ -543,7 +543,7 @@ To retrieve the state from a given module, use the following functions:
543543.. c :function :: int PyModule_GetStateSize (PyObject *, Py_ssize_t *result)
544544
545545 Set *\* result * to the size of the module's state, as specified using
546- :c:macro: `Py_mod_size ` (or :c:member: `PyModuleDef.m_size `),
546+ :c:macro: `Py_mod_state_size ` (or :c:member: `PyModuleDef.m_size `),
547547 and return 0.
548548
549549 On error, set *\*result* to -1, and return -1 with an exception set.
@@ -681,7 +681,17 @@ remove it.
681681
682682 .. c:member:: PyModuleDef_Base m_base
683683
684- Always initialize this member to :c:macro:`PyModuleDef_HEAD_INIT`.
684+ Always initialize this member to :c:macro:`PyModuleDef_HEAD_INIT`:
685+
686+ .. c:namespace:: NULL
687+
688+ .. c:type:: PyModuleDef_Base
689+
690+ The type of :c:member:`!PyModuleDef.m_base`.
691+
692+ .. c:macro:: PyModuleDef_HEAD_INIT
693+
694+ The required initial value for :c:member:`!PyModuleDef.m_base`.
685695
686696 .. c:member:: const char *m_name
687697 const char *m_doc
@@ -734,6 +744,7 @@ remove it.
734744 :c:member: `!m_traverse `, :c:member: `m_clear ` and :c:member: `m_free `
735745 functions are longer called before the module state is allocated.
736746
747+
737748.. _moduledef-dynamic :
738749
739750The following API can be used to create modules from a :c:type: `!PyModuleDef `
0 commit comments