diff options
author | nkozlovskiy <nmk@ydb.tech> | 2023-09-29 12:24:06 +0300 |
---|---|---|
committer | nkozlovskiy <nmk@ydb.tech> | 2023-09-29 12:41:34 +0300 |
commit | e0e3e1717e3d33762ce61950504f9637a6e669ed (patch) | |
tree | bca3ff6939b10ed60c3d5c12439963a1146b9711 /contrib/tools/python/src/Python/importdl.h | |
parent | 38f2c5852db84c7b4d83adfcb009eb61541d1ccd (diff) | |
download | ydb-e0e3e1717e3d33762ce61950504f9637a6e669ed.tar.gz |
add ydb deps
Diffstat (limited to 'contrib/tools/python/src/Python/importdl.h')
-rw-r--r-- | contrib/tools/python/src/Python/importdl.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/contrib/tools/python/src/Python/importdl.h b/contrib/tools/python/src/Python/importdl.h new file mode 100644 index 0000000000..b4d21be6f0 --- /dev/null +++ b/contrib/tools/python/src/Python/importdl.h @@ -0,0 +1,53 @@ +#ifndef Py_IMPORTDL_H +#define Py_IMPORTDL_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Definitions for dynamic loading of extension modules */ +enum filetype { + SEARCH_ERROR, + PY_SOURCE, + PY_COMPILED, + C_EXTENSION, + PY_RESOURCE, /* Mac only */ + PKG_DIRECTORY, + C_BUILTIN, + PY_FROZEN, + PY_CODERESOURCE, /* Mac only */ + IMP_HOOK +}; + +struct filedescr { + char *suffix; + char *mode; + enum filetype type; +}; +extern struct filedescr * _PyImport_Filetab; +extern const struct filedescr _PyImport_DynLoadFiletab[]; + +extern PyObject *_PyImport_LoadDynamicModule(char *name, char *pathname, + FILE *); + +/* Max length of module suffix searched for -- accommodates "module.slb" */ +#define MAXSUFFIXSIZE 12 + +#ifdef MS_WINDOWS +#include <windows.h> +typedef FARPROC dl_funcptr; +#else +#if defined(PYOS_OS2) && !defined(PYCC_GCC) +#include <os2def.h> +typedef int (* APIENTRY dl_funcptr)(); +#else +typedef void (*dl_funcptr)(void); +#endif +#endif + + +#ifdef __cplusplus +} +#endif +#endif /* !Py_IMPORTDL_H */ |