#include "Python.h"
#include "pycore_call.h"
#include "pycore_import.h"
#include "pycore_pyerrors.h"
#include "pycore_pystate.h"
#include "pycore_runtime.h"
#include "pycore_importdl.h"
#ifdef HAVE_DYNAMIC_LOADING
#ifdef MS_WINDOWS
extern dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
const char *shortname,
PyObject *pathname,
FILE *fp);
#else
extern dl_funcptr _PyImport_FindSharedFuncptr(const char *prefix,
const char *shortname,
const char *pathname, FILE *fp);
#endif
#endif
static const char * const ascii_only_prefix = …;
static const char * const nonascii_prefix = …;
static PyObject *
get_encoded_name(PyObject *name, const char **hook_prefix) { … }
void
_Py_ext_module_loader_info_clear(struct _Py_ext_module_loader_info *info)
{ … }
int
_Py_ext_module_loader_info_init(struct _Py_ext_module_loader_info *p_info,
PyObject *name, PyObject *filename,
_Py_ext_module_origin origin)
{ … }
int
_Py_ext_module_loader_info_init_for_builtin(
struct _Py_ext_module_loader_info *info,
PyObject *name)
{ … }
int
_Py_ext_module_loader_info_init_for_core(
struct _Py_ext_module_loader_info *info,
PyObject *name)
{ … }
#ifdef HAVE_DYNAMIC_LOADING
int
_Py_ext_module_loader_info_init_from_spec(
struct _Py_ext_module_loader_info *p_info,
PyObject *spec)
{ … }
#endif
void
_Py_ext_module_loader_result_clear(struct _Py_ext_module_loader_result *res)
{ … }
static void
_Py_ext_module_loader_result_set_error(
struct _Py_ext_module_loader_result *res,
enum _Py_ext_module_loader_result_error_kind kind)
{ … }
void
_Py_ext_module_loader_result_apply_error(
struct _Py_ext_module_loader_result *res,
const char *name)
{ … }
#ifdef HAVE_DYNAMIC_LOADING
PyModInitFunction
_PyImport_GetModInitFunc(struct _Py_ext_module_loader_info *info,
FILE *fp)
{ … }
#endif
int
_PyImport_RunModInitFunc(PyModInitFunction p0,
struct _Py_ext_module_loader_info *info,
struct _Py_ext_module_loader_result *p_res)
{ … }