You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
509 B

  1. /* Support for dynamic loading of extension modules */
  2. #include "dl.h"
  3. #include "Python.h"
  4. #include "importdl.h"
  5. extern char *Py_GetProgramName(void);
  6. const char *_PyImport_DynLoadFiletab[] = {".o", NULL};
  7. dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
  8. const char *pathname, FILE *fp)
  9. {
  10. char funcname[258];
  11. PyOS_snprintf(funcname, sizeof(funcname), "PyInit_%.200s", shortname);
  12. return dl_loadmod(Py_GetProgramName(), pathname, funcname);
  13. }