Skip to content

Commit 8552a8e

Browse files
committed
gh-139227: Remove unused _PyRuntime.imports.pkgcontext
The global variable has been replaced by the thread local variable "pkgcontext" in Python/import.c.
1 parent 18f3ffe commit 8552a8e

2 files changed

Lines changed: 0 additions & 4 deletions

File tree

Include/internal/pycore_interp_structs.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,6 @@ struct _import_runtime_state {
308308
Modules are added there and looked up in _imp.find_extension(). */
309309
struct _Py_hashtable_t *hashtable;
310310
} extensions;
311-
/* Package context -- the full module name for package imports */
312-
const char * pkgcontext;
313311
};
314312

315313
struct _import_state {

Python/import.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ static struct _inittab *inittab_copy = NULL;
8181
#define LAST_MODULE_INDEX _PyRuntime.imports.last_module_index
8282
#define EXTENSIONS _PyRuntime.imports.extensions
8383

84-
#define PKGCONTEXT (_PyRuntime.imports.pkgcontext)
85-
8684

8785
/*******************************/
8886
/* interpreter import state */

0 commit comments

Comments
 (0)