(Merge 3.3) According to the PEP 7, C code must "use 4-space indents"

Replace 8 spaces with 4.
This commit is contained in:
Victor Stinner 2013-07-27 00:01:35 +02:00
commit ee4b59c0f8
3 changed files with 6190 additions and 6235 deletions

View File

@ -42,25 +42,25 @@ typedef struct _withitem *withitem_ty;
enum _mod_kind {Module_kind=1, Interactive_kind=2, Expression_kind=3, enum _mod_kind {Module_kind=1, Interactive_kind=2, Expression_kind=3,
Suite_kind=4}; Suite_kind=4};
struct _mod { struct _mod {
enum _mod_kind kind; enum _mod_kind kind;
union { union {
struct { struct {
asdl_seq *body; asdl_seq *body;
} Module; } Module;
struct { struct {
asdl_seq *body; asdl_seq *body;
} Interactive; } Interactive;
struct { struct {
expr_ty body; expr_ty body;
} Expression; } Expression;
struct { struct {
asdl_seq *body; asdl_seq *body;
} Suite; } Suite;
} v; } v;
}; };
enum _stmt_kind {FunctionDef_kind=1, ClassDef_kind=2, Return_kind=3, enum _stmt_kind {FunctionDef_kind=1, ClassDef_kind=2, Return_kind=3,
@ -70,111 +70,111 @@ enum _stmt_kind {FunctionDef_kind=1, ClassDef_kind=2, Return_kind=3,
ImportFrom_kind=15, Global_kind=16, Nonlocal_kind=17, ImportFrom_kind=15, Global_kind=16, Nonlocal_kind=17,
Expr_kind=18, Pass_kind=19, Break_kind=20, Continue_kind=21}; Expr_kind=18, Pass_kind=19, Break_kind=20, Continue_kind=21};
struct _stmt { struct _stmt {
enum _stmt_kind kind; enum _stmt_kind kind;
union { union {
struct { struct {
identifier name; identifier name;
arguments_ty args; arguments_ty args;
asdl_seq *body; asdl_seq *body;
asdl_seq *decorator_list; asdl_seq *decorator_list;
expr_ty returns; expr_ty returns;
} FunctionDef; } FunctionDef;
struct { struct {
identifier name; identifier name;
asdl_seq *bases; asdl_seq *bases;
asdl_seq *keywords; asdl_seq *keywords;
expr_ty starargs; expr_ty starargs;
expr_ty kwargs; expr_ty kwargs;
asdl_seq *body; asdl_seq *body;
asdl_seq *decorator_list; asdl_seq *decorator_list;
} ClassDef; } ClassDef;
struct { struct {
expr_ty value; expr_ty value;
} Return; } Return;
struct { struct {
asdl_seq *targets; asdl_seq *targets;
} Delete; } Delete;
struct { struct {
asdl_seq *targets; asdl_seq *targets;
expr_ty value; expr_ty value;
} Assign; } Assign;
struct { struct {
expr_ty target; expr_ty target;
operator_ty op; operator_ty op;
expr_ty value; expr_ty value;
} AugAssign; } AugAssign;
struct { struct {
expr_ty target; expr_ty target;
expr_ty iter; expr_ty iter;
asdl_seq *body; asdl_seq *body;
asdl_seq *orelse; asdl_seq *orelse;
} For; } For;
struct { struct {
expr_ty test; expr_ty test;
asdl_seq *body; asdl_seq *body;
asdl_seq *orelse; asdl_seq *orelse;
} While; } While;
struct { struct {
expr_ty test; expr_ty test;
asdl_seq *body; asdl_seq *body;
asdl_seq *orelse; asdl_seq *orelse;
} If; } If;
struct { struct {
asdl_seq *items; asdl_seq *items;
asdl_seq *body; asdl_seq *body;
} With; } With;
struct { struct {
expr_ty exc; expr_ty exc;
expr_ty cause; expr_ty cause;
} Raise; } Raise;
struct { struct {
asdl_seq *body; asdl_seq *body;
asdl_seq *handlers; asdl_seq *handlers;
asdl_seq *orelse; asdl_seq *orelse;
asdl_seq *finalbody; asdl_seq *finalbody;
} Try; } Try;
struct { struct {
expr_ty test; expr_ty test;
expr_ty msg; expr_ty msg;
} Assert; } Assert;
struct { struct {
asdl_seq *names; asdl_seq *names;
} Import; } Import;
struct { struct {
identifier module; identifier module;
asdl_seq *names; asdl_seq *names;
int level; int level;
} ImportFrom; } ImportFrom;
struct { struct {
asdl_seq *names; asdl_seq *names;
} Global; } Global;
struct { struct {
asdl_seq *names; asdl_seq *names;
} Nonlocal; } Nonlocal;
struct { struct {
expr_ty value; expr_ty value;
} Expr; } Expr;
} v; } v;
int lineno; int lineno;
int col_offset; int col_offset;
}; };
enum _expr_kind {BoolOp_kind=1, BinOp_kind=2, UnaryOp_kind=3, Lambda_kind=4, enum _expr_kind {BoolOp_kind=1, BinOp_kind=2, UnaryOp_kind=3, Lambda_kind=4,
@ -186,211 +186,211 @@ enum _expr_kind {BoolOp_kind=1, BinOp_kind=2, UnaryOp_kind=3, Lambda_kind=4,
Subscript_kind=22, Starred_kind=23, Name_kind=24, Subscript_kind=22, Starred_kind=23, Name_kind=24,
List_kind=25, Tuple_kind=26}; List_kind=25, Tuple_kind=26};
struct _expr { struct _expr {
enum _expr_kind kind; enum _expr_kind kind;
union { union {
struct { struct {
boolop_ty op; boolop_ty op;
asdl_seq *values; asdl_seq *values;
} BoolOp; } BoolOp;
struct { struct {
expr_ty left; expr_ty left;
operator_ty op; operator_ty op;
expr_ty right; expr_ty right;
} BinOp; } BinOp;
struct { struct {
unaryop_ty op; unaryop_ty op;
expr_ty operand; expr_ty operand;
} UnaryOp; } UnaryOp;
struct { struct {
arguments_ty args; arguments_ty args;
expr_ty body; expr_ty body;
} Lambda; } Lambda;
struct { struct {
expr_ty test; expr_ty test;
expr_ty body; expr_ty body;
expr_ty orelse; expr_ty orelse;
} IfExp; } IfExp;
struct { struct {
asdl_seq *keys; asdl_seq *keys;
asdl_seq *values; asdl_seq *values;
} Dict; } Dict;
struct { struct {
asdl_seq *elts; asdl_seq *elts;
} Set; } Set;
struct { struct {
expr_ty elt; expr_ty elt;
asdl_seq *generators; asdl_seq *generators;
} ListComp; } ListComp;
struct { struct {
expr_ty elt; expr_ty elt;
asdl_seq *generators; asdl_seq *generators;
} SetComp; } SetComp;
struct { struct {
expr_ty key; expr_ty key;
expr_ty value; expr_ty value;
asdl_seq *generators; asdl_seq *generators;
} DictComp; } DictComp;
struct { struct {
expr_ty elt; expr_ty elt;
asdl_seq *generators; asdl_seq *generators;
} GeneratorExp; } GeneratorExp;
struct { struct {
expr_ty value; expr_ty value;
} Yield; } Yield;
struct { struct {
expr_ty value; expr_ty value;
} YieldFrom; } YieldFrom;
struct { struct {
expr_ty left; expr_ty left;
asdl_int_seq *ops; asdl_int_seq *ops;
asdl_seq *comparators; asdl_seq *comparators;
} Compare; } Compare;
struct { struct {
expr_ty func; expr_ty func;
asdl_seq *args; asdl_seq *args;
asdl_seq *keywords; asdl_seq *keywords;
expr_ty starargs; expr_ty starargs;
expr_ty kwargs; expr_ty kwargs;
} Call; } Call;
struct { struct {
object n; object n;
} Num; } Num;
struct { struct {
string s; string s;
} Str; } Str;
struct { struct {
bytes s; bytes s;
} Bytes; } Bytes;
struct { struct {
singleton value; singleton value;
} NameConstant; } NameConstant;
struct { struct {
expr_ty value; expr_ty value;
identifier attr; identifier attr;
expr_context_ty ctx; expr_context_ty ctx;
} Attribute; } Attribute;
struct { struct {
expr_ty value; expr_ty value;
slice_ty slice; slice_ty slice;
expr_context_ty ctx; expr_context_ty ctx;
} Subscript; } Subscript;
struct { struct {
expr_ty value; expr_ty value;
expr_context_ty ctx; expr_context_ty ctx;
} Starred; } Starred;
struct { struct {
identifier id; identifier id;
expr_context_ty ctx; expr_context_ty ctx;
} Name; } Name;
struct { struct {
asdl_seq *elts; asdl_seq *elts;
expr_context_ty ctx; expr_context_ty ctx;
} List; } List;
struct { struct {
asdl_seq *elts; asdl_seq *elts;
expr_context_ty ctx; expr_context_ty ctx;
} Tuple; } Tuple;
} v; } v;
int lineno; int lineno;
int col_offset; int col_offset;
}; };
enum _slice_kind {Slice_kind=1, ExtSlice_kind=2, Index_kind=3}; enum _slice_kind {Slice_kind=1, ExtSlice_kind=2, Index_kind=3};
struct _slice { struct _slice {
enum _slice_kind kind; enum _slice_kind kind;
union { union {
struct { struct {
expr_ty lower; expr_ty lower;
expr_ty upper; expr_ty upper;
expr_ty step; expr_ty step;
} Slice; } Slice;
struct { struct {
asdl_seq *dims; asdl_seq *dims;
} ExtSlice; } ExtSlice;
struct { struct {
expr_ty value; expr_ty value;
} Index; } Index;
} v; } v;
}; };
struct _comprehension { struct _comprehension {
expr_ty target; expr_ty target;
expr_ty iter; expr_ty iter;
asdl_seq *ifs; asdl_seq *ifs;
}; };
enum _excepthandler_kind {ExceptHandler_kind=1}; enum _excepthandler_kind {ExceptHandler_kind=1};
struct _excepthandler { struct _excepthandler {
enum _excepthandler_kind kind; enum _excepthandler_kind kind;
union { union {
struct { struct {
expr_ty type; expr_ty type;
identifier name; identifier name;
asdl_seq *body; asdl_seq *body;
} ExceptHandler; } ExceptHandler;
} v; } v;
int lineno; int lineno;
int col_offset; int col_offset;
}; };
struct _arguments { struct _arguments {
asdl_seq *args; asdl_seq *args;
arg_ty vararg; arg_ty vararg;
asdl_seq *kwonlyargs; asdl_seq *kwonlyargs;
asdl_seq *kw_defaults; asdl_seq *kw_defaults;
arg_ty kwarg; arg_ty kwarg;
asdl_seq *defaults; asdl_seq *defaults;
}; };
struct _arg { struct _arg {
identifier arg; identifier arg;
expr_ty annotation; expr_ty annotation;
int lineno; int lineno;
int col_offset; int col_offset;
}; };
struct _keyword { struct _keyword {
identifier arg; identifier arg;
expr_ty value; expr_ty value;
}; };
struct _alias { struct _alias {
identifier name; identifier name;
identifier asname; identifier asname;
}; };
struct _withitem { struct _withitem {
expr_ty context_expr; expr_ty context_expr;
expr_ty optional_vars; expr_ty optional_vars;
}; };

View File

@ -8,7 +8,7 @@ import os, sys
import asdl import asdl
TABSIZE = 8 TABSIZE = 4
MAX_COL = 80 MAX_COL = 80
def get_c_type(name): def get_c_type(name):

File diff suppressed because it is too large Load Diff