Skip to content

Commit 9f65081

Browse files
committed
Some rearrangements for the importdl.c restructuring.
This is part of a set of patches by Greg Stein.
1 parent 6ea9092 commit 9f65081

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

Python/importdl.h

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
#ifndef Py_IMPORTDL_H
2+
#define Py_IMPORTDL_H
3+
4+
#ifdef __cplusplus
5+
extern "C" {
6+
#endif
7+
18
/***********************************************************
29
Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
310
The Netherlands.
@@ -42,14 +49,32 @@ enum filetype {
4249
PY_CODERESOURCE /* Mac only */
4350
};
4451

45-
extern struct filedescr {
52+
struct filedescr {
4653
char *suffix;
4754
char *mode;
4855
enum filetype type;
49-
} _PyImport_Filetab[];
56+
};
57+
extern struct filedescr * _PyImport_Filetab;
58+
extern const struct filedescr _PyImport_DynLoadFiletab[];
5059

5160
extern PyObject *_PyImport_LoadDynamicModule
5261
Py_PROTO((char *name, char *pathname, FILE *));
5362

5463
/* Max length of module suffix searched for -- accommodates "module.slb" */
5564
#define MAXSUFFIXSIZE 12
65+
66+
#ifdef MS_WINDOWS
67+
typedef FARPROC dl_funcptr;
68+
#else
69+
#ifdef PYOS_OS2
70+
typedef int (* APIENTRY dl_funcptr)();
71+
#else
72+
typedef void (*dl_funcptr)(void);
73+
#endif
74+
#endif
75+
76+
77+
#ifdef __cplusplus
78+
}
79+
#endif
80+
#endif /* !Py_IMPORTDL_H */

0 commit comments

Comments
 (0)