Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Deal with inittab_copy.
  • Loading branch information
ericsnowcurrently committed Nov 11, 2022
commit a4c2ea128619d3917a3ac9b210c7f739de4185e3
2 changes: 2 additions & 0 deletions Python/import.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ extern struct _inittab _PyImport_Inittab[];
// This is not used after Py_Initialize() is called.
// (See _PyRuntimeState.imports.inittab.)
struct _inittab *PyImport_Inittab = _PyImport_Inittab;
// When we dynamically allocate a larger table for PyImport_ExtendInittab(),
// we track the pointer here so we can deallocate it during finalization.
static struct _inittab *inittab_copy = NULL;

/*[clinic input]
Expand Down
1 change: 0 additions & 1 deletion Tools/c-analyzer/cpython/globals-to-fix.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ Python/frozen.c - _PyImport_FrozenAliases -
Python/frozen.c - _PyImport_FrozenBootstrap -
Python/frozen.c - _PyImport_FrozenStdlib -
Python/frozen.c - _PyImport_FrozenTest -
Python/import.c - inittab_copy -
Python/preconfig.c - Py_FileSystemDefaultEncoding -
Python/preconfig.c - Py_HasFileSystemDefaultEncoding -
Python/preconfig.c - Py_FileSystemDefaultEncodeErrors -
Expand Down
1 change: 1 addition & 0 deletions Tools/c-analyzer/cpython/ignored.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ filename funcname name reason
##################################
# mutable but known to be safe

Python/import.c - inittab_copy -
Python/import.c - PyImport_Inittab -
Python/pylifecycle.c - _PyRuntime -

Expand Down