This commit was manufactured by cvs2svn to create tag 'r221c2'.
[python/dscho.git] / Python / importdl.h
blob76fd05d29337ccf4947fd76d68b8ad67224e34b2
1 #ifndef Py_IMPORTDL_H
2 #define Py_IMPORTDL_H
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
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 */
22 struct filedescr {
23 char *suffix;
24 char *mode;
25 enum filetype type;
27 extern struct filedescr * _PyImport_Filetab;
28 extern const struct filedescr _PyImport_DynLoadFiletab[];
30 extern PyObject *_PyImport_LoadDynamicModule(char *name, char *pathname,
31 FILE *);
33 /* Max length of module suffix searched for -- accommodates "module.slb" */
34 #define MAXSUFFIXSIZE 12
36 #ifdef MS_WINDOWS
37 #include <windows.h>
38 typedef FARPROC dl_funcptr;
39 #else
40 #ifdef PYOS_OS2
41 #include <os2def.h>
42 typedef int (* APIENTRY dl_funcptr)();
43 #else
44 typedef void (*dl_funcptr)(void);
45 #endif
46 #endif
49 #ifdef __cplusplus
51 #endif
52 #endif /* !Py_IMPORTDL_H */