Localize the function lookup in timeit.
[python.git] / Python / dynload_dl.c
blob4675a6722ac159efa1792dc4ca5c76ded7284663
2 /* Support for dynamic loading of extension modules */
4 #include "dl.h"
6 #include "Python.h"
7 #include "importdl.h"
10 extern char *Py_GetProgramName(void);
12 const struct filedescr _PyImport_DynLoadFiletab[] = {
13 {".o", "rb", C_EXTENSION},
14 {"module.o", "rb", C_EXTENSION},
15 {0, 0}
19 dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
20 const char *pathname, FILE *fp)
22 char funcname[258];
24 PyOS_snprintf(funcname, sizeof(funcname), "init%.200s", shortname);
25 return dl_loadmod(Py_GetProgramName(), pathname, funcname);