Skip to content

Commit ba475eb

Browse files
author
neal.norwitz
committed
* Fix a refleak of *_attributes.
* Cleanup formatting a bit (add spaces). * Move static var initialized inside init_types() since that's the only place it's used. git-svn-id: http://svn.python.org/projects/python/trunk@43565 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent bc84f98 commit ba475eb

2 files changed

Lines changed: 153 additions & 149 deletions

File tree

Parser/asdl_c.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -413,18 +413,20 @@ def visitModule(self, mod):
413413
414414
static int add_attributes(PyTypeObject* type, char**attrs, int num_fields)
415415
{
416-
int i;
416+
int i, result;
417417
PyObject *s, *l = PyList_New(num_fields);
418418
if (!l) return 0;
419-
for(i=0; i < num_fields; i++) {
419+
for(i = 0; i < num_fields; i++) {
420420
s = PyString_FromString(attrs[i]);
421421
if (!s) {
422422
Py_DECREF(l);
423423
return 0;
424424
}
425425
PyList_SET_ITEM(l, i, s);
426426
}
427-
return PyObject_SetAttrString((PyObject*)type, "_attributes", l) >=0;
427+
result = PyObject_SetAttrString((PyObject*)type, "_attributes", l) >= 0;
428+
Py_DECREF(l);
429+
return result;
428430
}
429431
430432
static PyObject* ast2obj_list(asdl_seq *seq, PyObject* (*func)(void*))
@@ -465,9 +467,9 @@ def visitModule(self, mod):
465467
}
466468
""", 0, reflow=False)
467469

468-
self.emit("static int initialized;", 0)
469470
self.emit("static int init_types(void)",0)
470471
self.emit("{", 0)
472+
self.emit("static int initialized;", 1)
471473
self.emit("if (initialized) return 1;", 1)
472474
self.emit('AST_type = make_type("AST", &PyBaseObject_Type, NULL, 0);', 1)
473475
for dfn in mod.dfns:
@@ -543,7 +545,7 @@ def visitConstructor(self, cons, name):
543545
self.addObj(cons.name)
544546

545547
def addObj(self, name):
546-
self.emit('if(PyDict_SetItemString(d, "%s", (PyObject*)%s_type) < 0) return;' % (name, name), 1)
548+
self.emit('if (PyDict_SetItemString(d, "%s", (PyObject*)%s_type) < 0) return;' % (name, name), 1)
547549

548550
_SPECIALIZED_SEQUENCES = ('stmt', 'expr')
549551

Python/Python-ast.c

Lines changed: 146 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -381,18 +381,20 @@ static PyTypeObject* make_type(char *type, PyTypeObject* base, char**fields, int
381381

382382
static int add_attributes(PyTypeObject* type, char**attrs, int num_fields)
383383
{
384-
int i;
384+
int i, result;
385385
PyObject *s, *l = PyList_New(num_fields);
386386
if (!l) return 0;
387-
for(i=0; i < num_fields; i++) {
387+
for(i = 0; i < num_fields; i++) {
388388
s = PyString_FromString(attrs[i]);
389389
if (!s) {
390390
Py_DECREF(l);
391391
return 0;
392392
}
393393
PyList_SET_ITEM(l, i, s);
394394
}
395-
return PyObject_SetAttrString((PyObject*)type, "_attributes", l) >=0;
395+
result = PyObject_SetAttrString((PyObject*)type, "_attributes", l) >= 0;
396+
Py_DECREF(l);
397+
return result;
396398
}
397399

398400
static PyObject* ast2obj_list(asdl_seq *seq, PyObject* (*func)(void*))
@@ -432,9 +434,9 @@ static PyObject* ast2obj_int(bool b)
432434
return PyInt_FromLong(b);
433435
}
434436

435-
static int initialized;
436437
static int init_types(void)
437438
{
439+
static int initialized;
438440
if (initialized) return 1;
439441
AST_type = make_type("AST", &PyBaseObject_Type, NULL, 0);
440442
mod_type = make_type("mod", AST_type, NULL, 0);
@@ -3033,146 +3035,146 @@ init_ast(void)
30333035
return;
30343036
if (PyModule_AddStringConstant(m, "__version__", "42753") < 0)
30353037
return;
3036-
if(PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return;
3037-
if(PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0)
3038-
return;
3039-
if(PyDict_SetItemString(d, "Interactive", (PyObject*)Interactive_type)
3040-
< 0) return;
3041-
if(PyDict_SetItemString(d, "Expression", (PyObject*)Expression_type) <
3042-
0) return;
3043-
if(PyDict_SetItemString(d, "Suite", (PyObject*)Suite_type) < 0) return;
3044-
if(PyDict_SetItemString(d, "stmt", (PyObject*)stmt_type) < 0) return;
3045-
if(PyDict_SetItemString(d, "FunctionDef", (PyObject*)FunctionDef_type)
3046-
< 0) return;
3047-
if(PyDict_SetItemString(d, "ClassDef", (PyObject*)ClassDef_type) < 0)
3048-
return;
3049-
if(PyDict_SetItemString(d, "Return", (PyObject*)Return_type) < 0)
3050-
return;
3051-
if(PyDict_SetItemString(d, "Delete", (PyObject*)Delete_type) < 0)
3052-
return;
3053-
if(PyDict_SetItemString(d, "Assign", (PyObject*)Assign_type) < 0)
3054-
return;
3055-
if(PyDict_SetItemString(d, "AugAssign", (PyObject*)AugAssign_type) < 0)
3056-
return;
3057-
if(PyDict_SetItemString(d, "Print", (PyObject*)Print_type) < 0) return;
3058-
if(PyDict_SetItemString(d, "For", (PyObject*)For_type) < 0) return;
3059-
if(PyDict_SetItemString(d, "While", (PyObject*)While_type) < 0) return;
3060-
if(PyDict_SetItemString(d, "If", (PyObject*)If_type) < 0) return;
3061-
if(PyDict_SetItemString(d, "With", (PyObject*)With_type) < 0) return;
3062-
if(PyDict_SetItemString(d, "Raise", (PyObject*)Raise_type) < 0) return;
3063-
if(PyDict_SetItemString(d, "TryExcept", (PyObject*)TryExcept_type) < 0)
3064-
return;
3065-
if(PyDict_SetItemString(d, "TryFinally", (PyObject*)TryFinally_type) <
3066-
0) return;
3067-
if(PyDict_SetItemString(d, "Assert", (PyObject*)Assert_type) < 0)
3068-
return;
3069-
if(PyDict_SetItemString(d, "Import", (PyObject*)Import_type) < 0)
3070-
return;
3071-
if(PyDict_SetItemString(d, "ImportFrom", (PyObject*)ImportFrom_type) <
3072-
0) return;
3073-
if(PyDict_SetItemString(d, "Exec", (PyObject*)Exec_type) < 0) return;
3074-
if(PyDict_SetItemString(d, "Global", (PyObject*)Global_type) < 0)
3075-
return;
3076-
if(PyDict_SetItemString(d, "Expr", (PyObject*)Expr_type) < 0) return;
3077-
if(PyDict_SetItemString(d, "Pass", (PyObject*)Pass_type) < 0) return;
3078-
if(PyDict_SetItemString(d, "Break", (PyObject*)Break_type) < 0) return;
3079-
if(PyDict_SetItemString(d, "Continue", (PyObject*)Continue_type) < 0)
3080-
return;
3081-
if(PyDict_SetItemString(d, "expr", (PyObject*)expr_type) < 0) return;
3082-
if(PyDict_SetItemString(d, "BoolOp", (PyObject*)BoolOp_type) < 0)
3083-
return;
3084-
if(PyDict_SetItemString(d, "BinOp", (PyObject*)BinOp_type) < 0) return;
3085-
if(PyDict_SetItemString(d, "UnaryOp", (PyObject*)UnaryOp_type) < 0)
3086-
return;
3087-
if(PyDict_SetItemString(d, "Lambda", (PyObject*)Lambda_type) < 0)
3088-
return;
3089-
if(PyDict_SetItemString(d, "IfExp", (PyObject*)IfExp_type) < 0) return;
3090-
if(PyDict_SetItemString(d, "Dict", (PyObject*)Dict_type) < 0) return;
3091-
if(PyDict_SetItemString(d, "ListComp", (PyObject*)ListComp_type) < 0)
3092-
return;
3093-
if(PyDict_SetItemString(d, "GeneratorExp",
3094-
(PyObject*)GeneratorExp_type) < 0) return;
3095-
if(PyDict_SetItemString(d, "Yield", (PyObject*)Yield_type) < 0) return;
3096-
if(PyDict_SetItemString(d, "Compare", (PyObject*)Compare_type) < 0)
3097-
return;
3098-
if(PyDict_SetItemString(d, "Call", (PyObject*)Call_type) < 0) return;
3099-
if(PyDict_SetItemString(d, "Repr", (PyObject*)Repr_type) < 0) return;
3100-
if(PyDict_SetItemString(d, "Num", (PyObject*)Num_type) < 0) return;
3101-
if(PyDict_SetItemString(d, "Str", (PyObject*)Str_type) < 0) return;
3102-
if(PyDict_SetItemString(d, "Attribute", (PyObject*)Attribute_type) < 0)
3103-
return;
3104-
if(PyDict_SetItemString(d, "Subscript", (PyObject*)Subscript_type) < 0)
3105-
return;
3106-
if(PyDict_SetItemString(d, "Name", (PyObject*)Name_type) < 0) return;
3107-
if(PyDict_SetItemString(d, "List", (PyObject*)List_type) < 0) return;
3108-
if(PyDict_SetItemString(d, "Tuple", (PyObject*)Tuple_type) < 0) return;
3109-
if(PyDict_SetItemString(d, "expr_context",
3110-
(PyObject*)expr_context_type) < 0) return;
3111-
if(PyDict_SetItemString(d, "Load", (PyObject*)Load_type) < 0) return;
3112-
if(PyDict_SetItemString(d, "Store", (PyObject*)Store_type) < 0) return;
3113-
if(PyDict_SetItemString(d, "Del", (PyObject*)Del_type) < 0) return;
3114-
if(PyDict_SetItemString(d, "AugLoad", (PyObject*)AugLoad_type) < 0)
3115-
return;
3116-
if(PyDict_SetItemString(d, "AugStore", (PyObject*)AugStore_type) < 0)
3117-
return;
3118-
if(PyDict_SetItemString(d, "Param", (PyObject*)Param_type) < 0) return;
3119-
if(PyDict_SetItemString(d, "slice", (PyObject*)slice_type) < 0) return;
3120-
if(PyDict_SetItemString(d, "Ellipsis", (PyObject*)Ellipsis_type) < 0)
3121-
return;
3122-
if(PyDict_SetItemString(d, "Slice", (PyObject*)Slice_type) < 0) return;
3123-
if(PyDict_SetItemString(d, "ExtSlice", (PyObject*)ExtSlice_type) < 0)
3124-
return;
3125-
if(PyDict_SetItemString(d, "Index", (PyObject*)Index_type) < 0) return;
3126-
if(PyDict_SetItemString(d, "boolop", (PyObject*)boolop_type) < 0)
3127-
return;
3128-
if(PyDict_SetItemString(d, "And", (PyObject*)And_type) < 0) return;
3129-
if(PyDict_SetItemString(d, "Or", (PyObject*)Or_type) < 0) return;
3130-
if(PyDict_SetItemString(d, "operator", (PyObject*)operator_type) < 0)
3131-
return;
3132-
if(PyDict_SetItemString(d, "Add", (PyObject*)Add_type) < 0) return;
3133-
if(PyDict_SetItemString(d, "Sub", (PyObject*)Sub_type) < 0) return;
3134-
if(PyDict_SetItemString(d, "Mult", (PyObject*)Mult_type) < 0) return;
3135-
if(PyDict_SetItemString(d, "Div", (PyObject*)Div_type) < 0) return;
3136-
if(PyDict_SetItemString(d, "Mod", (PyObject*)Mod_type) < 0) return;
3137-
if(PyDict_SetItemString(d, "Pow", (PyObject*)Pow_type) < 0) return;
3138-
if(PyDict_SetItemString(d, "LShift", (PyObject*)LShift_type) < 0)
3139-
return;
3140-
if(PyDict_SetItemString(d, "RShift", (PyObject*)RShift_type) < 0)
3141-
return;
3142-
if(PyDict_SetItemString(d, "BitOr", (PyObject*)BitOr_type) < 0) return;
3143-
if(PyDict_SetItemString(d, "BitXor", (PyObject*)BitXor_type) < 0)
3144-
return;
3145-
if(PyDict_SetItemString(d, "BitAnd", (PyObject*)BitAnd_type) < 0)
3146-
return;
3147-
if(PyDict_SetItemString(d, "FloorDiv", (PyObject*)FloorDiv_type) < 0)
3148-
return;
3149-
if(PyDict_SetItemString(d, "unaryop", (PyObject*)unaryop_type) < 0)
3150-
return;
3151-
if(PyDict_SetItemString(d, "Invert", (PyObject*)Invert_type) < 0)
3152-
return;
3153-
if(PyDict_SetItemString(d, "Not", (PyObject*)Not_type) < 0) return;
3154-
if(PyDict_SetItemString(d, "UAdd", (PyObject*)UAdd_type) < 0) return;
3155-
if(PyDict_SetItemString(d, "USub", (PyObject*)USub_type) < 0) return;
3156-
if(PyDict_SetItemString(d, "cmpop", (PyObject*)cmpop_type) < 0) return;
3157-
if(PyDict_SetItemString(d, "Eq", (PyObject*)Eq_type) < 0) return;
3158-
if(PyDict_SetItemString(d, "NotEq", (PyObject*)NotEq_type) < 0) return;
3159-
if(PyDict_SetItemString(d, "Lt", (PyObject*)Lt_type) < 0) return;
3160-
if(PyDict_SetItemString(d, "LtE", (PyObject*)LtE_type) < 0) return;
3161-
if(PyDict_SetItemString(d, "Gt", (PyObject*)Gt_type) < 0) return;
3162-
if(PyDict_SetItemString(d, "GtE", (PyObject*)GtE_type) < 0) return;
3163-
if(PyDict_SetItemString(d, "Is", (PyObject*)Is_type) < 0) return;
3164-
if(PyDict_SetItemString(d, "IsNot", (PyObject*)IsNot_type) < 0) return;
3165-
if(PyDict_SetItemString(d, "In", (PyObject*)In_type) < 0) return;
3166-
if(PyDict_SetItemString(d, "NotIn", (PyObject*)NotIn_type) < 0) return;
3167-
if(PyDict_SetItemString(d, "comprehension",
3168-
(PyObject*)comprehension_type) < 0) return;
3169-
if(PyDict_SetItemString(d, "excepthandler",
3170-
(PyObject*)excepthandler_type) < 0) return;
3171-
if(PyDict_SetItemString(d, "arguments", (PyObject*)arguments_type) < 0)
3172-
return;
3173-
if(PyDict_SetItemString(d, "keyword", (PyObject*)keyword_type) < 0)
3174-
return;
3175-
if(PyDict_SetItemString(d, "alias", (PyObject*)alias_type) < 0) return;
3038+
if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return;
3039+
if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0)
3040+
return;
3041+
if (PyDict_SetItemString(d, "Interactive", (PyObject*)Interactive_type)
3042+
< 0) return;
3043+
if (PyDict_SetItemString(d, "Expression", (PyObject*)Expression_type) <
3044+
0) return;
3045+
if (PyDict_SetItemString(d, "Suite", (PyObject*)Suite_type) < 0) return;
3046+
if (PyDict_SetItemString(d, "stmt", (PyObject*)stmt_type) < 0) return;
3047+
if (PyDict_SetItemString(d, "FunctionDef", (PyObject*)FunctionDef_type)
3048+
< 0) return;
3049+
if (PyDict_SetItemString(d, "ClassDef", (PyObject*)ClassDef_type) < 0)
3050+
return;
3051+
if (PyDict_SetItemString(d, "Return", (PyObject*)Return_type) < 0)
3052+
return;
3053+
if (PyDict_SetItemString(d, "Delete", (PyObject*)Delete_type) < 0)
3054+
return;
3055+
if (PyDict_SetItemString(d, "Assign", (PyObject*)Assign_type) < 0)
3056+
return;
3057+
if (PyDict_SetItemString(d, "AugAssign", (PyObject*)AugAssign_type) <
3058+
0) return;
3059+
if (PyDict_SetItemString(d, "Print", (PyObject*)Print_type) < 0) return;
3060+
if (PyDict_SetItemString(d, "For", (PyObject*)For_type) < 0) return;
3061+
if (PyDict_SetItemString(d, "While", (PyObject*)While_type) < 0) return;
3062+
if (PyDict_SetItemString(d, "If", (PyObject*)If_type) < 0) return;
3063+
if (PyDict_SetItemString(d, "With", (PyObject*)With_type) < 0) return;
3064+
if (PyDict_SetItemString(d, "Raise", (PyObject*)Raise_type) < 0) return;
3065+
if (PyDict_SetItemString(d, "TryExcept", (PyObject*)TryExcept_type) <
3066+
0) return;
3067+
if (PyDict_SetItemString(d, "TryFinally", (PyObject*)TryFinally_type) <
3068+
0) return;
3069+
if (PyDict_SetItemString(d, "Assert", (PyObject*)Assert_type) < 0)
3070+
return;
3071+
if (PyDict_SetItemString(d, "Import", (PyObject*)Import_type) < 0)
3072+
return;
3073+
if (PyDict_SetItemString(d, "ImportFrom", (PyObject*)ImportFrom_type) <
3074+
0) return;
3075+
if (PyDict_SetItemString(d, "Exec", (PyObject*)Exec_type) < 0) return;
3076+
if (PyDict_SetItemString(d, "Global", (PyObject*)Global_type) < 0)
3077+
return;
3078+
if (PyDict_SetItemString(d, "Expr", (PyObject*)Expr_type) < 0) return;
3079+
if (PyDict_SetItemString(d, "Pass", (PyObject*)Pass_type) < 0) return;
3080+
if (PyDict_SetItemString(d, "Break", (PyObject*)Break_type) < 0) return;
3081+
if (PyDict_SetItemString(d, "Continue", (PyObject*)Continue_type) < 0)
3082+
return;
3083+
if (PyDict_SetItemString(d, "expr", (PyObject*)expr_type) < 0) return;
3084+
if (PyDict_SetItemString(d, "BoolOp", (PyObject*)BoolOp_type) < 0)
3085+
return;
3086+
if (PyDict_SetItemString(d, "BinOp", (PyObject*)BinOp_type) < 0) return;
3087+
if (PyDict_SetItemString(d, "UnaryOp", (PyObject*)UnaryOp_type) < 0)
3088+
return;
3089+
if (PyDict_SetItemString(d, "Lambda", (PyObject*)Lambda_type) < 0)
3090+
return;
3091+
if (PyDict_SetItemString(d, "IfExp", (PyObject*)IfExp_type) < 0) return;
3092+
if (PyDict_SetItemString(d, "Dict", (PyObject*)Dict_type) < 0) return;
3093+
if (PyDict_SetItemString(d, "ListComp", (PyObject*)ListComp_type) < 0)
3094+
return;
3095+
if (PyDict_SetItemString(d, "GeneratorExp",
3096+
(PyObject*)GeneratorExp_type) < 0) return;
3097+
if (PyDict_SetItemString(d, "Yield", (PyObject*)Yield_type) < 0) return;
3098+
if (PyDict_SetItemString(d, "Compare", (PyObject*)Compare_type) < 0)
3099+
return;
3100+
if (PyDict_SetItemString(d, "Call", (PyObject*)Call_type) < 0) return;
3101+
if (PyDict_SetItemString(d, "Repr", (PyObject*)Repr_type) < 0) return;
3102+
if (PyDict_SetItemString(d, "Num", (PyObject*)Num_type) < 0) return;
3103+
if (PyDict_SetItemString(d, "Str", (PyObject*)Str_type) < 0) return;
3104+
if (PyDict_SetItemString(d, "Attribute", (PyObject*)Attribute_type) <
3105+
0) return;
3106+
if (PyDict_SetItemString(d, "Subscript", (PyObject*)Subscript_type) <
3107+
0) return;
3108+
if (PyDict_SetItemString(d, "Name", (PyObject*)Name_type) < 0) return;
3109+
if (PyDict_SetItemString(d, "List", (PyObject*)List_type) < 0) return;
3110+
if (PyDict_SetItemString(d, "Tuple", (PyObject*)Tuple_type) < 0) return;
3111+
if (PyDict_SetItemString(d, "expr_context",
3112+
(PyObject*)expr_context_type) < 0) return;
3113+
if (PyDict_SetItemString(d, "Load", (PyObject*)Load_type) < 0) return;
3114+
if (PyDict_SetItemString(d, "Store", (PyObject*)Store_type) < 0) return;
3115+
if (PyDict_SetItemString(d, "Del", (PyObject*)Del_type) < 0) return;
3116+
if (PyDict_SetItemString(d, "AugLoad", (PyObject*)AugLoad_type) < 0)
3117+
return;
3118+
if (PyDict_SetItemString(d, "AugStore", (PyObject*)AugStore_type) < 0)
3119+
return;
3120+
if (PyDict_SetItemString(d, "Param", (PyObject*)Param_type) < 0) return;
3121+
if (PyDict_SetItemString(d, "slice", (PyObject*)slice_type) < 0) return;
3122+
if (PyDict_SetItemString(d, "Ellipsis", (PyObject*)Ellipsis_type) < 0)
3123+
return;
3124+
if (PyDict_SetItemString(d, "Slice", (PyObject*)Slice_type) < 0) return;
3125+
if (PyDict_SetItemString(d, "ExtSlice", (PyObject*)ExtSlice_type) < 0)
3126+
return;
3127+
if (PyDict_SetItemString(d, "Index", (PyObject*)Index_type) < 0) return;
3128+
if (PyDict_SetItemString(d, "boolop", (PyObject*)boolop_type) < 0)
3129+
return;
3130+
if (PyDict_SetItemString(d, "And", (PyObject*)And_type) < 0) return;
3131+
if (PyDict_SetItemString(d, "Or", (PyObject*)Or_type) < 0) return;
3132+
if (PyDict_SetItemString(d, "operator", (PyObject*)operator_type) < 0)
3133+
return;
3134+
if (PyDict_SetItemString(d, "Add", (PyObject*)Add_type) < 0) return;
3135+
if (PyDict_SetItemString(d, "Sub", (PyObject*)Sub_type) < 0) return;
3136+
if (PyDict_SetItemString(d, "Mult", (PyObject*)Mult_type) < 0) return;
3137+
if (PyDict_SetItemString(d, "Div", (PyObject*)Div_type) < 0) return;
3138+
if (PyDict_SetItemString(d, "Mod", (PyObject*)Mod_type) < 0) return;
3139+
if (PyDict_SetItemString(d, "Pow", (PyObject*)Pow_type) < 0) return;
3140+
if (PyDict_SetItemString(d, "LShift", (PyObject*)LShift_type) < 0)
3141+
return;
3142+
if (PyDict_SetItemString(d, "RShift", (PyObject*)RShift_type) < 0)
3143+
return;
3144+
if (PyDict_SetItemString(d, "BitOr", (PyObject*)BitOr_type) < 0) return;
3145+
if (PyDict_SetItemString(d, "BitXor", (PyObject*)BitXor_type) < 0)
3146+
return;
3147+
if (PyDict_SetItemString(d, "BitAnd", (PyObject*)BitAnd_type) < 0)
3148+
return;
3149+
if (PyDict_SetItemString(d, "FloorDiv", (PyObject*)FloorDiv_type) < 0)
3150+
return;
3151+
if (PyDict_SetItemString(d, "unaryop", (PyObject*)unaryop_type) < 0)
3152+
return;
3153+
if (PyDict_SetItemString(d, "Invert", (PyObject*)Invert_type) < 0)
3154+
return;
3155+
if (PyDict_SetItemString(d, "Not", (PyObject*)Not_type) < 0) return;
3156+
if (PyDict_SetItemString(d, "UAdd", (PyObject*)UAdd_type) < 0) return;
3157+
if (PyDict_SetItemString(d, "USub", (PyObject*)USub_type) < 0) return;
3158+
if (PyDict_SetItemString(d, "cmpop", (PyObject*)cmpop_type) < 0) return;
3159+
if (PyDict_SetItemString(d, "Eq", (PyObject*)Eq_type) < 0) return;
3160+
if (PyDict_SetItemString(d, "NotEq", (PyObject*)NotEq_type) < 0) return;
3161+
if (PyDict_SetItemString(d, "Lt", (PyObject*)Lt_type) < 0) return;
3162+
if (PyDict_SetItemString(d, "LtE", (PyObject*)LtE_type) < 0) return;
3163+
if (PyDict_SetItemString(d, "Gt", (PyObject*)Gt_type) < 0) return;
3164+
if (PyDict_SetItemString(d, "GtE", (PyObject*)GtE_type) < 0) return;
3165+
if (PyDict_SetItemString(d, "Is", (PyObject*)Is_type) < 0) return;
3166+
if (PyDict_SetItemString(d, "IsNot", (PyObject*)IsNot_type) < 0) return;
3167+
if (PyDict_SetItemString(d, "In", (PyObject*)In_type) < 0) return;
3168+
if (PyDict_SetItemString(d, "NotIn", (PyObject*)NotIn_type) < 0) return;
3169+
if (PyDict_SetItemString(d, "comprehension",
3170+
(PyObject*)comprehension_type) < 0) return;
3171+
if (PyDict_SetItemString(d, "excepthandler",
3172+
(PyObject*)excepthandler_type) < 0) return;
3173+
if (PyDict_SetItemString(d, "arguments", (PyObject*)arguments_type) <
3174+
0) return;
3175+
if (PyDict_SetItemString(d, "keyword", (PyObject*)keyword_type) < 0)
3176+
return;
3177+
if (PyDict_SetItemString(d, "alias", (PyObject*)alias_type) < 0) return;
31763178
}
31773179

31783180

0 commit comments

Comments
 (0)