summaryrefslogtreecommitdiffstats
path: root/Python/importdl.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-12-20 21:22:24 (GMT)
committerGuido van Rossum <guido@python.org>1999-12-20 21:22:24 (GMT)
commit9f65081d90dcc40650adffd2ed730ff5eb1e47c0 (patch)
tree0632beab5c335b44e7befa8f7bedd5d9e67aeb9e /Python/importdl.h
parent6ea909262526ebd1fb96b8fe2d9d36d98a4bca13 (diff)
downloadcpython-9f65081d90dcc40650adffd2ed730ff5eb1e47c0.zip
cpython-9f65081d90dcc40650adffd2ed730ff5eb1e47c0.tar.gz
cpython-9f65081d90dcc40650adffd2ed730ff5eb1e47c0.tar.bz2
Some rearrangements for the importdl.c restructuring.
This is part of a set of patches by Greg Stein.
Diffstat (limited to 'Python/importdl.h')
-rw-r--r--Python/importdl.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/Python/importdl.h b/Python/importdl.h
index 2309043..5c729a8 100644
--- a/Python/importdl.h
+++ b/Python/importdl.h
@@ -1,3 +1,10 @@
+#ifndef Py_IMPORTDL_H
+#define Py_IMPORTDL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
The Netherlands.
@@ -42,14 +49,32 @@ enum filetype {
PY_CODERESOURCE /* Mac only */
};
-extern struct filedescr {
+struct filedescr {
char *suffix;
char *mode;
enum filetype type;
-} _PyImport_Filetab[];
+};
+extern struct filedescr * _PyImport_Filetab;
+extern const struct filedescr _PyImport_DynLoadFiletab[];
extern PyObject *_PyImport_LoadDynamicModule
Py_PROTO((char *name, char *pathname, FILE *));
/* Max length of module suffix searched for -- accommodates "module.slb" */
#define MAXSUFFIXSIZE 12
+
+#ifdef MS_WINDOWS
+typedef FARPROC dl_funcptr;
+#else
+#ifdef PYOS_OS2
+typedef int (* APIENTRY dl_funcptr)();
+#else
+typedef void (*dl_funcptr)(void);
+#endif
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_IMPORTDL_H */