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.

25 lines
553 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. {0, 0}
  9. };
  10. dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
  11. const char *pathname, FILE *fp)
  12. {
  13. char funcname[258];
  14. PyOS_snprintf(funcname, sizeof(funcname), "PyInit_%.200s", shortname);
  15. return dl_loadmod(Py_GetProgramName(), pathname, funcname);
  16. }