Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9)

Side by Side Diff: Include/code.h

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « .hgtags ('k') | Include/opcode.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Definitions for bytecode */ 1 /* Definitions for bytecode */
2 2
3 #ifndef Py_LIMITED_API 3 #ifndef Py_LIMITED_API
4 #ifndef Py_CODE_H 4 #ifndef Py_CODE_H
5 #define Py_CODE_H 5 #define Py_CODE_H
6 #ifdef __cplusplus 6 #ifdef __cplusplus
7 extern "C" { 7 extern "C" {
8 #endif 8 #endif
9 9
10 /* Bytecode object */ 10 /* Bytecode object */
11 typedef struct { 11 typedef struct {
12 PyObject_HEAD 12 PyObject_HEAD
13 int co_argcount; /* #arguments, except *args */ 13 int co_argcount; /* #arguments, except *args */
14 int co_kwonlyargcount; /* #keyword only arguments */ 14 int co_kwonlyargcount; /* #keyword only arguments */
15 int co_nlocals; /* #local variables */ 15 int co_nlocals; /* #local variables */
16 int co_stacksize; /* #entries needed for evaluation stack */ 16 int co_stacksize; /* #entries needed for evaluation stack */
17 int co_flags; /* CO_..., see below */ 17 int co_flags; /* CO_..., see below */
18 PyObject *co_code; /* instruction opcodes */ 18 PyObject *co_code; /* instruction opcodes */
19 PyObject *co_consts; /* list (constants used) */ 19 PyObject *co_consts; /* list (constants used) */
20 PyObject *co_names; /* list of strings (names used) */ 20 PyObject *co_names; /* list of strings (names used) */
21 PyObject *co_varnames; /* tuple of strings (local variable names) */ 21 PyObject *co_varnames; /* tuple of strings (local variable names) */
22 PyObject *co_freevars; /* tuple of strings (free variable names) */ 22 PyObject *co_freevars; /* tuple of strings (free variable names) */
23 PyObject *co_cellvars; /* tuple of strings (cell variable names) */ 23 PyObject *co_cellvars; /* tuple of strings (cell variable names) */
24 /* The rest doesn't count for hash or comparisons */ 24 /* The rest doesn't count for hash or comparisons */
25 unsigned char *co_cell2arg; /* Maps cell vars which are arguments. */
26 PyObject *co_filename; /* unicode (where it was loaded from) */ 25 PyObject *co_filename; /* unicode (where it was loaded from) */
27 PyObject *co_name; /* unicode (name, for reference) */ 26 PyObject *co_name; /* unicode (name, for reference) */
28 int co_firstlineno; /* first source line number */ 27 int co_firstlineno; /* first source line number */
29 PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) See 28 PyObject *co_lnotab; /* string (encoding addr<->lineno mapping) See
30 Objects/lnotab_notes.txt for details. */ 29 Objects/lnotab_notes.txt for details. */
31 void *co_zombieframe; /* for optimization only (see frameobject.c) */ 30 void *co_zombieframe; /* for optimization only (see frameobject.c) */
32 PyObject *co_weakreflist; /* to support weakrefs to code objects */ 31 PyObject *co_weakreflist; /* to support weakrefs to code objects */
33 } PyCodeObject; 32 } PyCodeObject;
34 33
35 /* Masks for co_flags above */ 34 /* Masks for co_flags above */
(...skipping 14 matching lines...) Expand all
50 #if 0 49 #if 0
51 #define CO_GENERATOR_ALLOWED 0x1000 50 #define CO_GENERATOR_ALLOWED 0x1000
52 #endif 51 #endif
53 #define CO_FUTURE_DIVISION 0x2000 52 #define CO_FUTURE_DIVISION 0x2000
54 #define CO_FUTURE_ABSOLUTE_IMPORT 0x4000 /* do absolute imports by default */ 53 #define CO_FUTURE_ABSOLUTE_IMPORT 0x4000 /* do absolute imports by default */
55 #define CO_FUTURE_WITH_STATEMENT 0x8000 54 #define CO_FUTURE_WITH_STATEMENT 0x8000
56 #define CO_FUTURE_PRINT_FUNCTION 0x10000 55 #define CO_FUTURE_PRINT_FUNCTION 0x10000
57 #define CO_FUTURE_UNICODE_LITERALS 0x20000 56 #define CO_FUTURE_UNICODE_LITERALS 0x20000
58 57
59 #define CO_FUTURE_BARRY_AS_BDFL 0x40000 58 #define CO_FUTURE_BARRY_AS_BDFL 0x40000
60
61 /* This value is found in the co_cell2arg array when the associated cell
62 variable does not correspond to an argument. The maximum number of
63 arguments is 255 (indexed up to 254), so 255 work as a special flag.*/
64 #define CO_CELL_NOT_AN_ARG 255
65 59
66 /* This should be defined if a future statement modifies the syntax. 60 /* This should be defined if a future statement modifies the syntax.
67 For example, when a keyword is added. 61 For example, when a keyword is added.
68 */ 62 */
69 #define PY_PARSER_REQUIRES_FUTURE_KEYWORD 63 #define PY_PARSER_REQUIRES_FUTURE_KEYWORD
70 64
71 #define CO_MAXBLOCKS 20 /* Max static block nesting within a function */ 65 #define CO_MAXBLOCKS 20 /* Max static block nesting within a function */
72 66
73 PyAPI_DATA(PyTypeObject) PyCode_Type; 67 PyAPI_DATA(PyTypeObject) PyCode_Type;
74 68
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 #endif 100 #endif
107 101
108 PyAPI_FUNC(PyObject*) PyCode_Optimize(PyObject *code, PyObject* consts, 102 PyAPI_FUNC(PyObject*) PyCode_Optimize(PyObject *code, PyObject* consts,
109 PyObject *names, PyObject *lineno_obj); 103 PyObject *names, PyObject *lineno_obj);
110 104
111 #ifdef __cplusplus 105 #ifdef __cplusplus
112 } 106 }
113 #endif 107 #endif
114 #endif /* !Py_CODE_H */ 108 #endif /* !Py_CODE_H */
115 #endif /* Py_LIMITED_API */ 109 #endif /* Py_LIMITED_API */
OLDNEW
« no previous file with comments | « .hgtags ('k') | Include/opcode.h » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+