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.

26 lines
564 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 struct filedescr _PyImport_DynLoadFiletab[] = {
  7. {".o", "rb", C_EXTENSION},
  8. {"module.o", "rb", C_EXTENSION},
  9. {0, 0}
  10. };
  11. dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
  12. const char *pathname, FILE *fp)
  13. {
  14. char funcname[258];
  15. PyOS_snprintf(funcname, sizeof(funcname), "PyInit_%.200s", shortname);
  16. return dl_loadmod(Py_GetProgramName(), pathname, funcname);
  17. }