Mercurial > cpython-lru_cache-weakref
annotate Python/importdl.h @ 13778:f6e4a9dd67cd legacy-trunk
Rename the "parser" package to "parsers" to be compatible with the PyXML
project.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Mon, 31 Jul 2000 23:59:54 +0000 |
| parents | a89f7f268de4 |
| children | 6f6f965c5e2d |
| rev | line source |
|---|---|
|
11601
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
1 #ifndef Py_IMPORTDL_H |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
2 #define Py_IMPORTDL_H |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
3 |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
4 #ifdef __cplusplus |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
5 extern "C" { |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
6 #endif |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
7 |
|
2052
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
8 /*********************************************************** |
|
13255
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
11608
diff
changeset
|
9 Copyright (c) 2000, BeOpen.com. |
|
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
11608
diff
changeset
|
10 Copyright (c) 1995-2000, Corporation for National Research Initiatives. |
|
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
11608
diff
changeset
|
11 Copyright (c) 1990-1995, Stichting Mathematisch Centrum. |
|
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
11608
diff
changeset
|
12 All rights reserved. |
|
2052
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
13 |
|
13255
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
11608
diff
changeset
|
14 See the file "Misc/COPYRIGHT" for information on usage and |
|
916fb024ce94
Change copyright notice.
Guido van Rossum <guido@python.org>
parents:
11608
diff
changeset
|
15 redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
|
2052
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
16 ******************************************************************/ |
|
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
17 |
|
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
18 /* Definitions for dynamic loading of extension modules */ |
|
6243
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
19 enum filetype { |
|
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
20 SEARCH_ERROR, |
|
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
21 PY_SOURCE, |
|
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
22 PY_COMPILED, |
|
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
23 C_EXTENSION, |
|
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
24 PY_RESOURCE, /* Mac only */ |
|
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
25 PKG_DIRECTORY, |
|
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
26 C_BUILTIN, |
|
8846
745334545898
Added declarations for Mac code resource modules (Jack Jansen).
Guido van Rossum <guido@python.org>
parents:
6243
diff
changeset
|
27 PY_FROZEN, |
|
745334545898
Added declarations for Mac code resource modules (Jack Jansen).
Guido van Rossum <guido@python.org>
parents:
6243
diff
changeset
|
28 PY_CODERESOURCE /* Mac only */ |
|
6243
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
29 }; |
|
2052
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
30 |
|
11601
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
31 struct filedescr { |
|
2052
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
32 char *suffix; |
|
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
33 char *mode; |
|
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
34 enum filetype type; |
|
11601
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
35 }; |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
36 extern struct filedescr * _PyImport_Filetab; |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
37 extern const struct filedescr _PyImport_DynLoadFiletab[]; |
|
2052
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
38 |
|
13447
a89f7f268de4
Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.
Tim Peters <tim.peters@gmail.com>
parents:
13256
diff
changeset
|
39 extern PyObject *_PyImport_LoadDynamicModule(char *name, char *pathname, |
|
a89f7f268de4
Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.
Tim Peters <tim.peters@gmail.com>
parents:
13256
diff
changeset
|
40 FILE *); |
|
2052
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
41 |
|
5894
e2df95b7be78
Removed some variables that are used to exchange data between import.c and
Guido van Rossum <guido@python.org>
parents:
5511
diff
changeset
|
42 /* Max length of module suffix searched for -- accommodates "module.slb" */ |
|
e2df95b7be78
Removed some variables that are used to exchange data between import.c and
Guido van Rossum <guido@python.org>
parents:
5511
diff
changeset
|
43 #define MAXSUFFIXSIZE 12 |
|
11601
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
44 |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
45 #ifdef MS_WINDOWS |
|
11608
9ec7d978800d
For Windows, need to add #include <windows.h>.
Guido van Rossum <guido@python.org>
parents:
11601
diff
changeset
|
46 #include <windows.h> |
|
11601
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
47 typedef FARPROC dl_funcptr; |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
48 #else |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
49 #ifdef PYOS_OS2 |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
50 typedef int (* APIENTRY dl_funcptr)(); |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
51 #else |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
52 typedef void (*dl_funcptr)(void); |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
53 #endif |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
54 #endif |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
55 |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
56 |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
57 #ifdef __cplusplus |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
58 } |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
59 #endif |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
60 #endif /* !Py_IMPORTDL_H */ |
