annotate Include/compile.h @ 79675:c0a2294de787 2.7

Issue #16199: Backport 2to3 typo fix from 3.2.
author Chris Jerdonek <chris.jerdonek@gmail.com>
date Thu, 11 Oct 2012 16:15:46 -0700
parents 96418f812f06
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
86
a6934380c6e7 "Compiling" version
Guido van Rossum <guido@python.org>
parents:
diff changeset
1
13444
5709ddba423c ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
2 #ifndef Py_COMPILE_H
5709ddba423c ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
3 #define Py_COMPILE_H
36745
3ffc1e1d2f57 Move #include to outside "extern C {}", before Tim figures out it'll break
Thomas Wouters <thomas@python.org>
parents: 36740
diff changeset
4
3ffc1e1d2f57 Move #include to outside "extern C {}", before Tim figures out it'll break
Thomas Wouters <thomas@python.org>
parents: 36740
diff changeset
5 #include "code.h"
3ffc1e1d2f57 Move #include to outside "extern C {}", before Tim figures out it'll break
Thomas Wouters <thomas@python.org>
parents: 36740
diff changeset
6
13444
5709ddba423c ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
7 #ifdef __cplusplus
5709ddba423c ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
8 extern "C" {
5709ddba423c ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
9 #endif
5709ddba423c ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents: 13256
diff changeset
10
86
a6934380c6e7 "Compiling" version
Guido van Rossum <guido@python.org>
parents:
diff changeset
11 /* Public interface */
161
25a7fb44e297 Satisfy Standard C rules about struct scope.
Guido van Rossum <guido@python.org>
parents: 145
diff changeset
12 struct _node; /* Declare the existence of this type */
26601
cc05c2c8660e Constify filenames and scripts. Fixes #651362.
Martin v. Löwis <martin@v.loewis.de>
parents: 24752
diff changeset
13 PyAPI_FUNC(PyCodeObject *) PyNode_Compile(struct _node *, const char *);
1329
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1257
diff changeset
14
16799
08d937107fe6 Improved __future__ parser; still more to do
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16781
diff changeset
15 /* Future feature support */
08d937107fe6 Improved __future__ parser; still more to do
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16781
diff changeset
16
08d937107fe6 Improved __future__ parser; still more to do
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16781
diff changeset
17 typedef struct {
35742
1c4d192f1568 Merge ast-branch to head
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 31514
diff changeset
18 int ff_features; /* flags set by future statements */
1c4d192f1568 Merge ast-branch to head
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 31514
diff changeset
19 int ff_lineno; /* line number of last future statement */
16799
08d937107fe6 Improved __future__ parser; still more to do
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16781
diff changeset
20 } PyFutureFeatures;
08d937107fe6 Improved __future__ parser; still more to do
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16781
diff changeset
21
08d937107fe6 Improved __future__ parser; still more to do
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 16781
diff changeset
22 #define FUTURE_NESTED_SCOPES "nested_scopes"
18609
59446d0f8341 Preliminary support for "from __future__ import generators" to enable
Guido van Rossum <guido@python.org>
parents: 18506
diff changeset
23 #define FUTURE_GENERATORS "generators"
19051
f20727cc3d0f Implement PEP 238 in its (almost) full glory.
Guido van Rossum <guido@python.org>
parents: 18611
diff changeset
24 #define FUTURE_DIVISION "division"
37418
cea54c9d921d Don't abbreviate ABS, use long name ABSOLUTE.
Neal Norwitz <nnorwitz@gmail.com>
parents: 36745
diff changeset
25 #define FUTURE_ABSOLUTE_IMPORT "absolute_import"
36726
bbf16fd024df from __future__ import with_statement addon for 'with', mostly written by
Thomas Wouters <thomas@python.org>
parents: 36712
diff changeset
26 #define FUTURE_WITH_STATEMENT "with_statement"
45891
727f743cf630 Backport of the print function, using a __future__ import.
Eric Smith <eric@trueblade.com>
parents: 37418
diff changeset
27 #define FUTURE_PRINT_FUNCTION "print_function"
46118
c78d3586c474 Patch #2477: Added from __future__ import unicode_literals
Christian Heimes <christian@cheimes.de>
parents: 45891
diff changeset
28 #define FUTURE_UNICODE_LITERALS "unicode_literals"
45891
727f743cf630 Backport of the print function, using a __future__ import.
Eric Smith <eric@trueblade.com>
parents: 37418
diff changeset
29
19051
f20727cc3d0f Implement PEP 238 in its (almost) full glory.
Guido van Rossum <guido@python.org>
parents: 18611
diff changeset
30
35742
1c4d192f1568 Merge ast-branch to head
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 31514
diff changeset
31 struct _mod; /* Declare the existence of this type */
35783
b1a0e1a2b28f use PyAPI_FUNC instead of DL_IMPORT. are we going to deprecate the old non-Py PREFIXED macros, etc?
Neal Norwitz <nnorwitz@gmail.com>
parents: 35766
diff changeset
32 PyAPI_FUNC(PyCodeObject *) PyAST_Compile(struct _mod *, const char *,
36065
ea083efdc96c Merge from ast-arena. This reduces the code in Python/ast.c by ~300 lines,
Neal Norwitz <nnorwitz@gmail.com>
parents: 35783
diff changeset
33 PyCompilerFlags *, PyArena *);
35783
b1a0e1a2b28f use PyAPI_FUNC instead of DL_IMPORT. are we going to deprecate the old non-Py PREFIXED macros, etc?
Neal Norwitz <nnorwitz@gmail.com>
parents: 35766
diff changeset
34 PyAPI_FUNC(PyFutureFeatures *) PyFuture_FromAST(struct _mod *, const char *);
35742
1c4d192f1568 Merge ast-branch to head
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 31514
diff changeset
35
1c4d192f1568 Merge ast-branch to head
Jeremy Hylton <jeremy@alum.mit.edu>
parents: 31514
diff changeset
36
1329
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1257
diff changeset
37 #ifdef __cplusplus
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1257
diff changeset
38 }
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1257
diff changeset
39 #endif
519c25039c6a * Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents: 1257
diff changeset
40 #endif /* !Py_COMPILE_H */