home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / Programming / Python2 / Python20_source / Python / importdl.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-10-25  |  931 b   |  52 lines

  1. #ifndef Py_IMPORTDL_H
  2. #define Py_IMPORTDL_H
  3.  
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7.  
  8.  
  9. /* Definitions for dynamic loading of extension modules */
  10. enum filetype {
  11.     SEARCH_ERROR,
  12.     PY_SOURCE,
  13.     PY_COMPILED,
  14.     C_EXTENSION,
  15.     PY_RESOURCE, /* Mac only */
  16.     PKG_DIRECTORY,
  17.     C_BUILTIN,
  18.     PY_FROZEN,
  19.     PY_CODERESOURCE /* Mac only */
  20. };
  21.  
  22. struct filedescr {
  23.     char *suffix;
  24.     char *mode;
  25.     enum filetype type;
  26. };
  27. extern struct filedescr * _PyImport_Filetab;
  28. extern const struct filedescr _PyImport_DynLoadFiletab[];
  29.  
  30. extern PyObject *_PyImport_LoadDynamicModule(char *name, char *pathname,
  31.                          FILE *);
  32.  
  33. /* Max length of module suffix searched for -- accommodates "module.slb" */
  34. #define MAXSUFFIXSIZE 12
  35.  
  36. #ifdef MS_WINDOWS
  37. #include <windows.h>
  38. typedef FARPROC dl_funcptr;
  39. #else
  40. #ifdef PYOS_OS2
  41. typedef int (* APIENTRY dl_funcptr)();
  42. #else
  43. typedef void (*dl_funcptr)(void);
  44. #endif
  45. #endif
  46.  
  47.  
  48. #ifdef __cplusplus
  49. }
  50. #endif
  51. #endif /* !Py_IMPORTDL_H */
  52.