1
2 /* Support for dynamic loading of extension modules */
3
4 #include "dl.h"
5
6 #include "Python.h"
7 #include "importdl.h"
8
9
10 extern char *Py_GetProgramName(void);
11
12 const char *_PyImport_DynLoadFiletab[] = {".o", NULL};
13
14
_PyImport_FindSharedFuncptr(const char * prefix,const char * shortname,const char * pathname,FILE * fp)15 dl_funcptr _PyImport_FindSharedFuncptr(const char *prefix,
16 const char *shortname,
17 const char *pathname, FILE *fp)
18 {
19 char funcname[258];
20
21 PyOS_snprintf(funcname, sizeof(funcname), "%.20s_%.200s", prefix, shortname);
22 return dl_loadmod(Py_GetProgramName(), pathname, funcname);
23 }
24