mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Introduce asdl_int_seq, to hold cmpop_ty.
This commit is contained in:
parent
0f1955daee
commit
0cc56e5c59
7 changed files with 44 additions and 23 deletions
|
@ -240,7 +240,7 @@ struct _expr {
|
|||
|
||||
struct {
|
||||
expr_ty left;
|
||||
asdl_seq *ops;
|
||||
asdl_int_seq *ops;
|
||||
asdl_seq *comparators;
|
||||
} Compare;
|
||||
|
||||
|
@ -409,7 +409,7 @@ expr_ty ListComp(expr_ty elt, asdl_seq * generators, int lineno, int
|
|||
expr_ty GeneratorExp(expr_ty elt, asdl_seq * generators, int lineno, int
|
||||
col_offset, PyArena *arena);
|
||||
expr_ty Yield(expr_ty value, int lineno, int col_offset, PyArena *arena);
|
||||
expr_ty Compare(expr_ty left, asdl_seq * ops, asdl_seq * comparators, int
|
||||
expr_ty Compare(expr_ty left, asdl_int_seq * ops, asdl_seq * comparators, int
|
||||
lineno, int col_offset, PyArena *arena);
|
||||
expr_ty Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, expr_ty
|
||||
starargs, expr_ty kwargs, int lineno, int col_offset, PyArena
|
||||
|
|
|
@ -22,7 +22,13 @@ typedef struct {
|
|||
void *elements[1];
|
||||
} asdl_seq;
|
||||
|
||||
typedef struct {
|
||||
int size;
|
||||
int elements[1];
|
||||
} asdl_int_seq;
|
||||
|
||||
asdl_seq *asdl_seq_new(int size, PyArena *arena);
|
||||
asdl_int_seq *asdl_int_seq_new(int size, PyArena *arena);
|
||||
|
||||
#define asdl_seq_GET(S, I) (S)->elements[(I)]
|
||||
#define asdl_seq_LEN(S) ((S) == NULL ? 0 : (S)->size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue