Mercurial > cpython-lru_cache-weakref
annotate Include/pgenheaders.h @ 4566:6403c94de50d legacy-trunk
Added safeguard against failure in __del__.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 27 Nov 1996 19:39:58 +0000 |
| parents | 65d2d8e67da3 |
| children | 4cc10908e6f4 |
| rev | line source |
|---|---|
|
1329
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
1 #ifndef Py_PGENHEADERS_H |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
2 #define Py_PGENHEADERS_H |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
3 #ifdef __cplusplus |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
4 extern "C" { |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
5 #endif |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
6 |
| 145 | 7 /*********************************************************** |
| 2058 | 8 Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
| 9 The Netherlands. | |
| 145 | 10 |
| 11 All Rights Reserved | |
| 12 | |
|
4503
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4043
diff
changeset
|
13 Permission to use, copy, modify, and distribute this software and its |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4043
diff
changeset
|
14 documentation for any purpose and without fee is hereby granted, |
| 145 | 15 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:
4043
diff
changeset
|
16 both that copyright notice and this permission notice appear in |
| 145 | 17 supporting documentation, and that the names of Stichting Mathematisch |
|
4503
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4043
diff
changeset
|
18 Centrum or CWI or Corporation for National Research Initiatives or |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4043
diff
changeset
|
19 CNRI not be used in advertising or publicity pertaining to |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4043
diff
changeset
|
20 distribution of the software without specific, written prior |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4043
diff
changeset
|
21 permission. |
| 145 | 22 |
|
4503
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4043
diff
changeset
|
23 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:
4043
diff
changeset
|
24 is made available by the Corporation for National Research Initiatives |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4043
diff
changeset
|
25 (CNRI) at the Internet address ftp://ftp.python.org. |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4043
diff
changeset
|
26 |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4043
diff
changeset
|
27 STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4043
diff
changeset
|
28 REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4043
diff
changeset
|
29 MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4043
diff
changeset
|
30 CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4043
diff
changeset
|
31 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:
4043
diff
changeset
|
32 PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
4043
diff
changeset
|
33 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:
4043
diff
changeset
|
34 PERFORMANCE OF THIS SOFTWARE. |
| 145 | 35 |
| 36 ******************************************************************/ | |
| 37 | |
| 1829 | 38 /* Include files and extern declarations used by most of the parser. */ |
| 86 | 39 |
|
1746
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1329
diff
changeset
|
40 #include "config.h" |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1329
diff
changeset
|
41 |
|
3582
6f45beed3873
Define DL_IMPORT if necessary.
Guido van Rossum <guido@python.org>
parents:
2129
diff
changeset
|
42 /* config.h may or may not define DL_IMPORT */ |
|
6f45beed3873
Define DL_IMPORT if necessary.
Guido van Rossum <guido@python.org>
parents:
2129
diff
changeset
|
43 #ifndef DL_IMPORT /* declarations for DLL import/export */ |
|
6f45beed3873
Define DL_IMPORT if necessary.
Guido van Rossum <guido@python.org>
parents:
2129
diff
changeset
|
44 #define DL_IMPORT(RTYPE) RTYPE |
|
6f45beed3873
Define DL_IMPORT if necessary.
Guido van Rossum <guido@python.org>
parents:
2129
diff
changeset
|
45 #endif |
|
6f45beed3873
Define DL_IMPORT if necessary.
Guido van Rossum <guido@python.org>
parents:
2129
diff
changeset
|
46 |
| 86 | 47 #include <stdio.h> |
|
96
27a5b08c3e74
Changes for THINK C 4.0.
Guido van Rossum <guido@python.org>
parents:
86
diff
changeset
|
48 #include <string.h> |
| 86 | 49 |
| 50 #ifdef THINK_C | |
| 51 #define label label_ | |
|
96
27a5b08c3e74
Changes for THINK C 4.0.
Guido van Rossum <guido@python.org>
parents:
86
diff
changeset
|
52 #undef label |
|
27a5b08c3e74
Changes for THINK C 4.0.
Guido van Rossum <guido@python.org>
parents:
86
diff
changeset
|
53 #endif |
|
27a5b08c3e74
Changes for THINK C 4.0.
Guido van Rossum <guido@python.org>
parents:
86
diff
changeset
|
54 |
|
1746
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1329
diff
changeset
|
55 #ifdef HAVE_STDLIB_H |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1329
diff
changeset
|
56 #include <stdlib.h> |
|
96
27a5b08c3e74
Changes for THINK C 4.0.
Guido van Rossum <guido@python.org>
parents:
86
diff
changeset
|
57 #endif |
|
27a5b08c3e74
Changes for THINK C 4.0.
Guido van Rossum <guido@python.org>
parents:
86
diff
changeset
|
58 |
|
1746
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1329
diff
changeset
|
59 #include "myproto.h" |
|
978
13c99eaf32a8
* renamed malloc.h mymalloc.h, and added MALLARG as the type of the
Guido van Rossum <guido@python.org>
parents:
790
diff
changeset
|
60 #include "mymalloc.h" |
| 86 | 61 |
|
3582
6f45beed3873
Define DL_IMPORT if necessary.
Guido van Rossum <guido@python.org>
parents:
2129
diff
changeset
|
62 #include "pydebug.h" |
|
1329
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
63 |
|
3606
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
64 #define addarc _Py_addarc |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
65 #define addbit _Py_addbit |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
66 #define adddfa _Py_adddfa |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
67 #define addfirstsets _Py_addfirstsets |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
68 #define addlabel _Py_addlabel |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
69 #define addstate _Py_addstate |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
70 #define delbitset _Py_delbitset |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
71 #define dumptree _Py_dumptree |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
72 #define findlabel _Py_findlabel |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
73 #define mergebitset _Py_mergebitset |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
74 #define meta_grammar _Py_meta_grammar |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
75 #define newbitset _Py_newbitset |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
76 #define newgrammar _Py_newgrammar |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
77 #define pgen _Py_pgen |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
78 #define printgrammar _Py_printgrammar |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
79 #define printnonterminals _Py_printnonterminals |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
80 #define printtree _Py_printtree |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
81 #define samebitset _Py_samebitset |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
82 #define showtree _Py_showtree |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
83 #define tok_dump _Py_tok_dump |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
84 #define translatelabels _Py_translatelabels |
|
1d4f2f20a27c
rename parser internal symbols with _Py_ prefix
Guido van Rossum <guido@python.org>
parents:
3582
diff
changeset
|
85 |
|
1329
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
86 #ifdef __cplusplus |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
87 } |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
88 #endif |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
89 #endif /* !Py_PGENHEADERS_H */ |
