diff options
| author | pefavel <[email protected]> | 2026-03-16 13:37:47 +0300 |
|---|---|---|
| committer | pefavel <[email protected]> | 2026-03-16 16:54:59 +0300 |
| commit | 270b7a3b0ea1e5f7485320b502c5b5b91da457ab (patch) | |
| tree | 45a0524743c578d300fea2765284c965b8af62ed /contrib/tools/python/src/Python/dynload_dl.c | |
| parent | de561d04b1e2e861ed3e823d3809f3ae05542dd4 (diff) | |
add fastapi to piglet config
commit_hash:6962a6b28ec3ee5fdc2392a2415810aaa54943c4
Diffstat (limited to 'contrib/tools/python/src/Python/dynload_dl.c')
| -rw-r--r-- | contrib/tools/python/src/Python/dynload_dl.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/tools/python/src/Python/dynload_dl.c b/contrib/tools/python/src/Python/dynload_dl.c new file mode 100644 index 00000000000..4675a6722ac --- /dev/null +++ b/contrib/tools/python/src/Python/dynload_dl.c @@ -0,0 +1,26 @@ + +/* Support for dynamic loading of extension modules */ + +#include "dl.h" + +#include "Python.h" +#include "importdl.h" + + +extern char *Py_GetProgramName(void); + +const struct filedescr _PyImport_DynLoadFiletab[] = { + {".o", "rb", C_EXTENSION}, + {"module.o", "rb", C_EXTENSION}, + {0, 0} +}; + + +dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, + const char *pathname, FILE *fp) +{ + char funcname[258]; + + PyOS_snprintf(funcname, sizeof(funcname), "init%.200s", shortname); + return dl_loadmod(Py_GetProgramName(), pathname, funcname); +} |
