summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2007-02-23 19:56:57 (GMT)
committerThomas Wouters <thomas@python.org>2007-02-23 19:56:57 (GMT)
commit00e41defe8801ef37548fb60abacb3be13156d2a (patch)
tree863d072e568fee2b8f4959016b5954de457c7f4c /Include
parentcf297e46b85257396560774e5492e9d71a40f32e (diff)
downloadcpython-00e41defe8801ef37548fb60abacb3be13156d2a.zip
cpython-00e41defe8801ef37548fb60abacb3be13156d2a.tar.gz
cpython-00e41defe8801ef37548fb60abacb3be13156d2a.tar.bz2
Bytes literal.
Diffstat (limited to 'Include')
-rw-r--r--Include/Python-ast.h12
-rw-r--r--Include/opcode.h2
2 files changed, 10 insertions, 4 deletions
diff --git a/Include/Python-ast.h b/Include/Python-ast.h
index c2fabfb..66d7b52 100644
--- a/Include/Python-ast.h
+++ b/Include/Python-ast.h
@@ -176,9 +176,9 @@ struct _stmt {
enum _expr_kind {BoolOp_kind=1, BinOp_kind=2, UnaryOp_kind=3, Lambda_kind=4,
IfExp_kind=5, Dict_kind=6, Set_kind=7, ListComp_kind=8,
GeneratorExp_kind=9, Yield_kind=10, Compare_kind=11,
- Call_kind=12, Num_kind=13, Str_kind=14, Ellipsis_kind=15,
- Attribute_kind=16, Subscript_kind=17, Name_kind=18,
- List_kind=19, Tuple_kind=20};
+ Call_kind=12, Num_kind=13, Str_kind=14, Bytes_kind=15,
+ Ellipsis_kind=16, Attribute_kind=17, Subscript_kind=18,
+ Name_kind=19, List_kind=20, Tuple_kind=21};
struct _expr {
enum _expr_kind kind;
union {
@@ -255,6 +255,10 @@ struct _expr {
} Str;
struct {
+ string s;
+ } Bytes;
+
+ struct {
expr_ty value;
identifier attr;
expr_context_ty ctx;
@@ -465,6 +469,8 @@ expr_ty _Py_Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, expr_ty
expr_ty _Py_Num(object n, int lineno, int col_offset, PyArena *arena);
#define Str(a0, a1, a2, a3) _Py_Str(a0, a1, a2, a3)
expr_ty _Py_Str(string s, int lineno, int col_offset, PyArena *arena);
+#define Bytes(a0, a1, a2, a3) _Py_Bytes(a0, a1, a2, a3)
+expr_ty _Py_Bytes(string s, int lineno, int col_offset, PyArena *arena);
#define Ellipsis(a0, a1, a2) _Py_Ellipsis(a0, a1, a2)
expr_ty _Py_Ellipsis(int lineno, int col_offset, PyArena *arena);
#define Attribute(a0, a1, a2, a3, a4, a5) _Py_Attribute(a0, a1, a2, a3, a4, a5)
diff --git a/Include/opcode.h b/Include/opcode.h
index 007816d..316ba4f 100644
--- a/Include/opcode.h
+++ b/Include/opcode.h
@@ -72,7 +72,7 @@ extern "C" {
#define LOAD_LOCALS 82
#define RETURN_VALUE 83
#define IMPORT_STAR 84
-
+#define MAKE_BYTES 85
#define YIELD_VALUE 86
#define POP_BLOCK 87
#define END_FINALLY 88