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.

23 lines
581 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_FindSharedFuncptr(const char *prefix,
  8. const char *shortname,
  9. const char *pathname, FILE *fp)
  10. {
  11. char funcname[258];
  12. PyOS_snprintf(funcname, sizeof(funcname), "%.20s_%.200s", prefix, shortname);
  13. return dl_loadmod(Py_GetProgramName(), pathname, funcname);
  14. }