Mercurial > cpython-lru_cache-weakref
annotate Python/importdl.h @ 11865:2fa89e657a4e legacy-trunk
Fix a typo in Barry's checkin.
Reported both by Gerrit Holl and Mark Favas.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Sun, 27 Feb 2000 15:35:47 +0000 |
| parents | 9ec7d978800d |
| children | 916fb024ce94 |
| 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 /*********************************************************** |
|
2062
d0d0a69b5ca3
Added 1995 to copyright message.
Guido van Rossum <guido@python.org>
parents:
2052
diff
changeset
|
9 Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
|
d0d0a69b5ca3
Added 1995 to copyright message.
Guido van Rossum <guido@python.org>
parents:
2052
diff
changeset
|
10 The Netherlands. |
|
2052
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
11 |
|
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
12 All Rights Reserved |
|
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
13 |
|
4503
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
14 Permission to use, copy, modify, and distribute this software and its |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
15 documentation for any purpose and without fee is hereby granted, |
|
2052
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
16 provided that the above copyright notice appear in all copies and that |
|
4503
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
17 both that copyright notice and this permission notice appear in |
|
2052
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
18 supporting documentation, and that the names of Stichting Mathematisch |
|
4503
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
19 Centrum or CWI or Corporation for National Research Initiatives or |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
20 CNRI not be used in advertising or publicity pertaining to |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
21 distribution of the software without specific, written prior |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
22 permission. |
|
2052
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
23 |
|
4503
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
24 While CWI is the initial source for this software, a modified version |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
25 is made available by the Corporation for National Research Initiatives |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
26 (CNRI) at the Internet address ftp://ftp.python.org. |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
27 |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
28 STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
29 REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
30 MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
31 CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
32 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
33 PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
34 TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2724
diff
changeset
|
35 PERFORMANCE OF THIS SOFTWARE. |
|
2052
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
36 |
|
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
37 ******************************************************************/ |
|
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
38 |
|
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
39 /* Definitions for dynamic loading of extension modules */ |
|
6243
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
40 enum filetype { |
|
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
41 SEARCH_ERROR, |
|
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
42 PY_SOURCE, |
|
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
43 PY_COMPILED, |
|
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
44 C_EXTENSION, |
|
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
45 PY_RESOURCE, /* Mac only */ |
|
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
46 PKG_DIRECTORY, |
|
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
47 C_BUILTIN, |
|
8846
745334545898
Added declarations for Mac code resource modules (Jack Jansen).
Guido van Rossum <guido@python.org>
parents:
6243
diff
changeset
|
48 PY_FROZEN, |
|
745334545898
Added declarations for Mac code resource modules (Jack Jansen).
Guido van Rossum <guido@python.org>
parents:
6243
diff
changeset
|
49 PY_CODERESOURCE /* Mac only */ |
|
6243
4279f4eb210a
First part of package support.
Guido van Rossum <guido@python.org>
parents:
5894
diff
changeset
|
50 }; |
|
2052
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
51 |
|
11601
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
52 struct filedescr { |
|
2052
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
53 char *suffix; |
|
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
54 char *mode; |
|
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
55 enum filetype type; |
|
11601
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 extern struct filedescr * _PyImport_Filetab; |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
58 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
|
59 |
|
5373
5880384d7c71
Quickly renamed the remaining files -- this directory is done.
Guido van Rossum <guido@python.org>
parents:
4503
diff
changeset
|
60 extern PyObject *_PyImport_LoadDynamicModule |
|
5880384d7c71
Quickly renamed the remaining files -- this directory is done.
Guido van Rossum <guido@python.org>
parents:
4503
diff
changeset
|
61 Py_PROTO((char *name, char *pathname, FILE *)); |
|
2052
d7e91437f0a2
Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
62 |
|
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
|
63 /* 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
|
64 #define MAXSUFFIXSIZE 12 |
|
11601
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
65 |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
66 #ifdef MS_WINDOWS |
|
11608
9ec7d978800d
For Windows, need to add #include <windows.h>.
Guido van Rossum <guido@python.org>
parents:
11601
diff
changeset
|
67 #include <windows.h> |
|
11601
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
68 typedef FARPROC dl_funcptr; |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
69 #else |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
70 #ifdef PYOS_OS2 |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
71 typedef int (* APIENTRY dl_funcptr)(); |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
72 #else |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
73 typedef void (*dl_funcptr)(void); |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
74 #endif |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
75 #endif |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
76 |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
77 |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
78 #ifdef __cplusplus |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
79 } |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
80 #endif |
|
0bad9d8b945f
Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents:
8846
diff
changeset
|
81 #endif /* !Py_IMPORTDL_H */ |
