File tree Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -325,3 +325,10 @@ Importing Modules
325325 If Python is initialized multiple times, :c:func: `PyImport_AppendInittab ` or
326326 :c:func: `PyImport_ExtendInittab ` must be called before each Python
327327 initialization.
328+
329+
330+ .. c :var :: struct _inittab *PyImport_Inittab
331+
332+ The table of built-in modules used by Python initialization. Do not use this directly;
333+ use :c:func: `PyImport_AppendInittab ` and :c:func: `PyImport_ExtendInittab `
334+ instead.
Original file line number Diff line number Diff line change @@ -426,7 +426,7 @@ A pointer to the module definition must be returned via :c:func:`PyModuleDef_Ini
426426so that the import machinery can create the module and store it in ``sys.modules ``.
427427
428428When embedding Python, the :c:func: `!PyInit_spam ` function is not called
429- automatically unless there's an entry in the :c:data: `! PyImport_Inittab ` table.
429+ automatically unless there's an entry in the :c:data: `PyImport_Inittab ` table.
430430To add the module to the initialization table, use :c:func: `PyImport_AppendInittab `,
431431optionally followed by an import of the module::
432432
Original file line number Diff line number Diff line change @@ -4931,7 +4931,7 @@ Patch by Gabriele N. Tornetta
49314931.. nonce: 3p14JB
49324932.. section: C API
49334933
4934- :c:func: `Py_RunMain ` now resets :c:data: `! PyImport_Inittab ` to its initial
4934+ :c:func: `Py_RunMain ` now resets :c:data: `PyImport_Inittab ` to its initial
49354935value at exit. It must be possible to call :c:func: `PyImport_AppendInittab `
49364936or :c:func: `PyImport_ExtendInittab ` at each Python initialization. Patch by
49374937Victor Stinner.
Original file line number Diff line number Diff line change @@ -35,11 +35,11 @@ Update bundled libexpat to 2.5.0
3535.. nonce: ik4iOv
3636.. section: Core and Builtins
3737
38- The docs clearly say that `` PyImport_Inittab ` `,
38+ The docs clearly say that :c:data: ` PyImport_Inittab `,
3939:c:func: `PyImport_AppendInittab `, and :c:func: `PyImport_ExtendInittab `
4040should not be used after :c:func: `Py_Initialize ` has been called. We now
4141enforce this for the two functions. Additionally, the runtime now uses an
42- internal copy of `` PyImport_Inittab ` `, to guard against modification.
42+ internal copy of :c:data: ` PyImport_Inittab `, to guard against modification.
4343
4444..
4545
You can’t perform that action at this time.
0 commit comments