FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-117953: Always Run Extension Init Func in Main Interpreter First by ericsnowcurrently · Pull Request #117487 · python/cpython · GitHub

/ cpython Public
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (2) .h  (2) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
1 change: 1 addition & 0 deletions Include/internal/pycore_import.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ extern int _PyImport_FixupBuiltin(
const char *name, /* UTF-8 encoded string */
PyObject *modules
);
// We could probably drop this:
extern int _PyImport_FixupExtensionObject(PyObject*, PyObject *,
PyObject *, PyObject *);

Expand Down
23 changes: 21 additions & 2 deletions Include/internal/pycore_importdl.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,29 @@ extern "C" {

extern const char *_PyImport_DynLoadFiletab[];

extern PyObject *_PyImport_LoadDynamicModuleWithSpec(PyObject *spec, FILE *);

typedef PyObject *(*PyModInitFunction)(void);

struct _Py_ext_module_loader_info {
PyObject *path;
PyObject *name;
PyObject *name_encoded;
const char *hook_prefix;
};
extern void _Py_ext_module_loader_info_clear(
struct _Py_ext_module_loader_info *info);
extern int _Py_ext_module_loader_info_from_spec(
PyObject *spec,
struct _Py_ext_module_loader_info *info);

struct _Py_ext_module_loader_result {
PyModuleDef *def;
PyObject *module;
};
extern int _PyImport_RunDynamicModule(
struct _Py_ext_module_loader_info *info,
FILE *fp,
struct _Py_ext_module_loader_result *res);

/* Max length of module suffix searched for -- accommodates "module.slb" */
#define MAXSUFFIXSIZE 12

Expand Down
Loading

Back | FazBrowse Home | New Git URL