summaryrefslogtreecommitdiff
path: root/sys/src/cmd/python/Python/importdl.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@localhost>2011-05-03 11:25:13 +0000
committercinap_lenrek <cinap_lenrek@localhost>2011-05-03 11:25:13 +0000
commit458120dd40db6b4df55a4e96b650e16798ef06a0 (patch)
tree8f82685be24fef97e715c6f5ca4c68d34d5074ee /sys/src/cmd/python/Python/importdl.h
parent3a742c699f6806c1145aea5149bf15de15a0afd7 (diff)
add hg and python
Diffstat (limited to 'sys/src/cmd/python/Python/importdl.h')
-rw-r--r--sys/src/cmd/python/Python/importdl.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/sys/src/cmd/python/Python/importdl.h b/sys/src/cmd/python/Python/importdl.h
new file mode 100644
index 000000000..5a2d45c46
--- /dev/null
+++ b/sys/src/cmd/python/Python/importdl.h
@@ -0,0 +1,53 @@
+#ifndef Py_IMPORTDL_H
+#define Py_IMPORTDL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Definitions for dynamic loading of extension modules */
+enum filetype {
+ SEARCH_ERROR,
+ PY_SOURCE,
+ PY_COMPILED,
+ C_EXTENSION,
+ PY_RESOURCE, /* Mac only */
+ PKG_DIRECTORY,
+ C_BUILTIN,
+ PY_FROZEN,
+ PY_CODERESOURCE, /* Mac only */
+ IMP_HOOK
+};
+
+struct filedescr {
+ char *suffix;
+ char *mode;
+ enum filetype type;
+};
+extern struct filedescr * _PyImport_Filetab;
+extern const struct filedescr _PyImport_DynLoadFiletab[];
+
+extern PyObject *_PyImport_LoadDynamicModule(char *name, char *pathname,
+ FILE *);
+
+/* Max length of module suffix searched for -- accommodates "module.slb" */
+#define MAXSUFFIXSIZE 12
+
+#ifdef MS_WINDOWS
+#include <windows.h>
+typedef FARPROC dl_funcptr;
+#else
+#if defined(PYOS_OS2) && !defined(PYCC_GCC)
+#include <os2def.h>
+typedef int (* APIENTRY dl_funcptr)();
+#else
+typedef void (*dl_funcptr)(void);
+#endif
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_IMPORTDL_H */