Skip to content

Commit 061e334

Browse files
committed
Expose _PyImport_SwapPackageContext in the ABI.
1 parent a756a4b commit 061e334

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Include/internal/pycore_import.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ extern void _PyImport_ClearCore(PyInterpreterState *interp);
5656

5757
extern Py_ssize_t _PyImport_GetNextModuleIndex(void);
5858
extern const char * _PyImport_ResolveNameWithPackageContext(const char *name);
59-
extern const char * _PyImport_SwapPackageContext(const char *newcontext);
59+
60+
// Exported for third party libraries that want access to our thread-local
61+
// package context. Ideally, this can be an unstable API at some point.
62+
PyAPI_FUNC(const char *) _PyImport_SwapPackageContext(const char *newcontext);
6063

6164
extern int _PyImport_GetDLOpenFlags(PyInterpreterState *interp);
6265
extern void _PyImport_SetDLOpenFlags(PyInterpreterState *interp, int new_val);

0 commit comments

Comments
 (0)