Mercurial > cpython-lru_cache-weakref
comparison Python/Python-ast.c @ 37412:dfc33ec7f73a legacy-trunk
* 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.
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Mon, 03 Apr 2006 04:50:58 +0000 |
| parents | df843b07f5fe |
| children | 16a64e394602 |
comparison
equal
deleted
inserted
replaced
| 37411:ea9a03b8b9f6 | 37412:dfc33ec7f73a |
|---|---|
| 379 return (PyTypeObject*)result; | 379 return (PyTypeObject*)result; |
| 380 } | 380 } |
| 381 | 381 |
| 382 static int add_attributes(PyTypeObject* type, char**attrs, int num_fields) | 382 static int add_attributes(PyTypeObject* type, char**attrs, int num_fields) |
| 383 { | 383 { |
| 384 int i; | 384 int i, result; |
| 385 PyObject *s, *l = PyList_New(num_fields); | 385 PyObject *s, *l = PyList_New(num_fields); |
| 386 if (!l) return 0; | 386 if (!l) return 0; |
| 387 for(i=0; i < num_fields; i++) { | 387 for(i = 0; i < num_fields; i++) { |
| 388 s = PyString_FromString(attrs[i]); | 388 s = PyString_FromString(attrs[i]); |
| 389 if (!s) { | 389 if (!s) { |
| 390 Py_DECREF(l); | 390 Py_DECREF(l); |
| 391 return 0; | 391 return 0; |
| 392 } | 392 } |
| 393 PyList_SET_ITEM(l, i, s); | 393 PyList_SET_ITEM(l, i, s); |
| 394 } | 394 } |
| 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; | |
| 396 } | 398 } |
| 397 | 399 |
| 398 static PyObject* ast2obj_list(asdl_seq *seq, PyObject* (*func)(void*)) | 400 static PyObject* ast2obj_list(asdl_seq *seq, PyObject* (*func)(void*)) |
| 399 { | 401 { |
| 400 int i, n = asdl_seq_LEN(seq); | 402 int i, n = asdl_seq_LEN(seq); |
| 430 static PyObject* ast2obj_int(bool b) | 432 static PyObject* ast2obj_int(bool b) |
| 431 { | 433 { |
| 432 return PyInt_FromLong(b); | 434 return PyInt_FromLong(b); |
| 433 } | 435 } |
| 434 | 436 |
| 435 static int initialized; | |
| 436 static int init_types(void) | 437 static int init_types(void) |
| 437 { | 438 { |
| 439 static int initialized; | |
| 438 if (initialized) return 1; | 440 if (initialized) return 1; |
| 439 AST_type = make_type("AST", &PyBaseObject_Type, NULL, 0); | 441 AST_type = make_type("AST", &PyBaseObject_Type, NULL, 0); |
| 440 mod_type = make_type("mod", AST_type, NULL, 0); | 442 mod_type = make_type("mod", AST_type, NULL, 0); |
| 441 if (!mod_type) return 0; | 443 if (!mod_type) return 0; |
| 442 if (!add_attributes(mod_type, NULL, 0)) return 0; | 444 if (!add_attributes(mod_type, NULL, 0)) return 0; |
| 3031 if (PyDict_SetItemString(d, "AST", (PyObject*)AST_type) < 0) return; | 3033 if (PyDict_SetItemString(d, "AST", (PyObject*)AST_type) < 0) return; |
| 3032 if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0) | 3034 if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0) |
| 3033 return; | 3035 return; |
| 3034 if (PyModule_AddStringConstant(m, "__version__", "42753") < 0) | 3036 if (PyModule_AddStringConstant(m, "__version__", "42753") < 0) |
| 3035 return; | 3037 return; |
| 3036 if(PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return; | 3038 if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return; |
| 3037 if(PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0) | 3039 if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0) |
| 3038 return; | 3040 return; |
| 3039 if(PyDict_SetItemString(d, "Interactive", (PyObject*)Interactive_type) | 3041 if (PyDict_SetItemString(d, "Interactive", (PyObject*)Interactive_type) |
| 3040 < 0) return; | 3042 < 0) return; |
| 3041 if(PyDict_SetItemString(d, "Expression", (PyObject*)Expression_type) < | 3043 if (PyDict_SetItemString(d, "Expression", (PyObject*)Expression_type) < |
| 3042 0) return; | 3044 0) return; |
| 3043 if(PyDict_SetItemString(d, "Suite", (PyObject*)Suite_type) < 0) return; | 3045 if (PyDict_SetItemString(d, "Suite", (PyObject*)Suite_type) < 0) return; |
| 3044 if(PyDict_SetItemString(d, "stmt", (PyObject*)stmt_type) < 0) return; | 3046 if (PyDict_SetItemString(d, "stmt", (PyObject*)stmt_type) < 0) return; |
| 3045 if(PyDict_SetItemString(d, "FunctionDef", (PyObject*)FunctionDef_type) | 3047 if (PyDict_SetItemString(d, "FunctionDef", (PyObject*)FunctionDef_type) |
| 3046 < 0) return; | 3048 < 0) return; |
| 3047 if(PyDict_SetItemString(d, "ClassDef", (PyObject*)ClassDef_type) < 0) | 3049 if (PyDict_SetItemString(d, "ClassDef", (PyObject*)ClassDef_type) < 0) |
| 3048 return; | 3050 return; |
| 3049 if(PyDict_SetItemString(d, "Return", (PyObject*)Return_type) < 0) | 3051 if (PyDict_SetItemString(d, "Return", (PyObject*)Return_type) < 0) |
| 3050 return; | 3052 return; |
| 3051 if(PyDict_SetItemString(d, "Delete", (PyObject*)Delete_type) < 0) | 3053 if (PyDict_SetItemString(d, "Delete", (PyObject*)Delete_type) < 0) |
| 3052 return; | 3054 return; |
| 3053 if(PyDict_SetItemString(d, "Assign", (PyObject*)Assign_type) < 0) | 3055 if (PyDict_SetItemString(d, "Assign", (PyObject*)Assign_type) < 0) |
| 3054 return; | 3056 return; |
| 3055 if(PyDict_SetItemString(d, "AugAssign", (PyObject*)AugAssign_type) < 0) | 3057 if (PyDict_SetItemString(d, "AugAssign", (PyObject*)AugAssign_type) < |
| 3056 return; | 3058 0) return; |
| 3057 if(PyDict_SetItemString(d, "Print", (PyObject*)Print_type) < 0) return; | 3059 if (PyDict_SetItemString(d, "Print", (PyObject*)Print_type) < 0) return; |
| 3058 if(PyDict_SetItemString(d, "For", (PyObject*)For_type) < 0) return; | 3060 if (PyDict_SetItemString(d, "For", (PyObject*)For_type) < 0) return; |
| 3059 if(PyDict_SetItemString(d, "While", (PyObject*)While_type) < 0) return; | 3061 if (PyDict_SetItemString(d, "While", (PyObject*)While_type) < 0) return; |
| 3060 if(PyDict_SetItemString(d, "If", (PyObject*)If_type) < 0) return; | 3062 if (PyDict_SetItemString(d, "If", (PyObject*)If_type) < 0) return; |
| 3061 if(PyDict_SetItemString(d, "With", (PyObject*)With_type) < 0) return; | 3063 if (PyDict_SetItemString(d, "With", (PyObject*)With_type) < 0) return; |
| 3062 if(PyDict_SetItemString(d, "Raise", (PyObject*)Raise_type) < 0) return; | 3064 if (PyDict_SetItemString(d, "Raise", (PyObject*)Raise_type) < 0) return; |
| 3063 if(PyDict_SetItemString(d, "TryExcept", (PyObject*)TryExcept_type) < 0) | 3065 if (PyDict_SetItemString(d, "TryExcept", (PyObject*)TryExcept_type) < |
| 3064 return; | 3066 0) return; |
| 3065 if(PyDict_SetItemString(d, "TryFinally", (PyObject*)TryFinally_type) < | 3067 if (PyDict_SetItemString(d, "TryFinally", (PyObject*)TryFinally_type) < |
| 3066 0) return; | 3068 0) return; |
| 3067 if(PyDict_SetItemString(d, "Assert", (PyObject*)Assert_type) < 0) | 3069 if (PyDict_SetItemString(d, "Assert", (PyObject*)Assert_type) < 0) |
| 3068 return; | 3070 return; |
| 3069 if(PyDict_SetItemString(d, "Import", (PyObject*)Import_type) < 0) | 3071 if (PyDict_SetItemString(d, "Import", (PyObject*)Import_type) < 0) |
| 3070 return; | 3072 return; |
| 3071 if(PyDict_SetItemString(d, "ImportFrom", (PyObject*)ImportFrom_type) < | 3073 if (PyDict_SetItemString(d, "ImportFrom", (PyObject*)ImportFrom_type) < |
| 3072 0) return; | 3074 0) return; |
| 3073 if(PyDict_SetItemString(d, "Exec", (PyObject*)Exec_type) < 0) return; | 3075 if (PyDict_SetItemString(d, "Exec", (PyObject*)Exec_type) < 0) return; |
| 3074 if(PyDict_SetItemString(d, "Global", (PyObject*)Global_type) < 0) | 3076 if (PyDict_SetItemString(d, "Global", (PyObject*)Global_type) < 0) |
| 3075 return; | 3077 return; |
| 3076 if(PyDict_SetItemString(d, "Expr", (PyObject*)Expr_type) < 0) return; | 3078 if (PyDict_SetItemString(d, "Expr", (PyObject*)Expr_type) < 0) return; |
| 3077 if(PyDict_SetItemString(d, "Pass", (PyObject*)Pass_type) < 0) return; | 3079 if (PyDict_SetItemString(d, "Pass", (PyObject*)Pass_type) < 0) return; |
| 3078 if(PyDict_SetItemString(d, "Break", (PyObject*)Break_type) < 0) return; | 3080 if (PyDict_SetItemString(d, "Break", (PyObject*)Break_type) < 0) return; |
| 3079 if(PyDict_SetItemString(d, "Continue", (PyObject*)Continue_type) < 0) | 3081 if (PyDict_SetItemString(d, "Continue", (PyObject*)Continue_type) < 0) |
| 3080 return; | 3082 return; |
| 3081 if(PyDict_SetItemString(d, "expr", (PyObject*)expr_type) < 0) return; | 3083 if (PyDict_SetItemString(d, "expr", (PyObject*)expr_type) < 0) return; |
| 3082 if(PyDict_SetItemString(d, "BoolOp", (PyObject*)BoolOp_type) < 0) | 3084 if (PyDict_SetItemString(d, "BoolOp", (PyObject*)BoolOp_type) < 0) |
| 3083 return; | 3085 return; |
| 3084 if(PyDict_SetItemString(d, "BinOp", (PyObject*)BinOp_type) < 0) return; | 3086 if (PyDict_SetItemString(d, "BinOp", (PyObject*)BinOp_type) < 0) return; |
| 3085 if(PyDict_SetItemString(d, "UnaryOp", (PyObject*)UnaryOp_type) < 0) | 3087 if (PyDict_SetItemString(d, "UnaryOp", (PyObject*)UnaryOp_type) < 0) |
| 3086 return; | 3088 return; |
| 3087 if(PyDict_SetItemString(d, "Lambda", (PyObject*)Lambda_type) < 0) | 3089 if (PyDict_SetItemString(d, "Lambda", (PyObject*)Lambda_type) < 0) |
| 3088 return; | 3090 return; |
| 3089 if(PyDict_SetItemString(d, "IfExp", (PyObject*)IfExp_type) < 0) return; | 3091 if (PyDict_SetItemString(d, "IfExp", (PyObject*)IfExp_type) < 0) return; |
| 3090 if(PyDict_SetItemString(d, "Dict", (PyObject*)Dict_type) < 0) return; | 3092 if (PyDict_SetItemString(d, "Dict", (PyObject*)Dict_type) < 0) return; |
| 3091 if(PyDict_SetItemString(d, "ListComp", (PyObject*)ListComp_type) < 0) | 3093 if (PyDict_SetItemString(d, "ListComp", (PyObject*)ListComp_type) < 0) |
| 3092 return; | 3094 return; |
| 3093 if(PyDict_SetItemString(d, "GeneratorExp", | 3095 if (PyDict_SetItemString(d, "GeneratorExp", |
| 3094 (PyObject*)GeneratorExp_type) < 0) return; | 3096 (PyObject*)GeneratorExp_type) < 0) return; |
| 3095 if(PyDict_SetItemString(d, "Yield", (PyObject*)Yield_type) < 0) return; | 3097 if (PyDict_SetItemString(d, "Yield", (PyObject*)Yield_type) < 0) return; |
| 3096 if(PyDict_SetItemString(d, "Compare", (PyObject*)Compare_type) < 0) | 3098 if (PyDict_SetItemString(d, "Compare", (PyObject*)Compare_type) < 0) |
| 3097 return; | 3099 return; |
| 3098 if(PyDict_SetItemString(d, "Call", (PyObject*)Call_type) < 0) return; | 3100 if (PyDict_SetItemString(d, "Call", (PyObject*)Call_type) < 0) return; |
| 3099 if(PyDict_SetItemString(d, "Repr", (PyObject*)Repr_type) < 0) return; | 3101 if (PyDict_SetItemString(d, "Repr", (PyObject*)Repr_type) < 0) return; |
| 3100 if(PyDict_SetItemString(d, "Num", (PyObject*)Num_type) < 0) return; | 3102 if (PyDict_SetItemString(d, "Num", (PyObject*)Num_type) < 0) return; |
| 3101 if(PyDict_SetItemString(d, "Str", (PyObject*)Str_type) < 0) return; | 3103 if (PyDict_SetItemString(d, "Str", (PyObject*)Str_type) < 0) return; |
| 3102 if(PyDict_SetItemString(d, "Attribute", (PyObject*)Attribute_type) < 0) | 3104 if (PyDict_SetItemString(d, "Attribute", (PyObject*)Attribute_type) < |
| 3103 return; | 3105 0) return; |
| 3104 if(PyDict_SetItemString(d, "Subscript", (PyObject*)Subscript_type) < 0) | 3106 if (PyDict_SetItemString(d, "Subscript", (PyObject*)Subscript_type) < |
| 3105 return; | 3107 0) return; |
| 3106 if(PyDict_SetItemString(d, "Name", (PyObject*)Name_type) < 0) return; | 3108 if (PyDict_SetItemString(d, "Name", (PyObject*)Name_type) < 0) return; |
| 3107 if(PyDict_SetItemString(d, "List", (PyObject*)List_type) < 0) return; | 3109 if (PyDict_SetItemString(d, "List", (PyObject*)List_type) < 0) return; |
| 3108 if(PyDict_SetItemString(d, "Tuple", (PyObject*)Tuple_type) < 0) return; | 3110 if (PyDict_SetItemString(d, "Tuple", (PyObject*)Tuple_type) < 0) return; |
| 3109 if(PyDict_SetItemString(d, "expr_context", | 3111 if (PyDict_SetItemString(d, "expr_context", |
| 3110 (PyObject*)expr_context_type) < 0) return; | 3112 (PyObject*)expr_context_type) < 0) return; |
| 3111 if(PyDict_SetItemString(d, "Load", (PyObject*)Load_type) < 0) return; | 3113 if (PyDict_SetItemString(d, "Load", (PyObject*)Load_type) < 0) return; |
| 3112 if(PyDict_SetItemString(d, "Store", (PyObject*)Store_type) < 0) return; | 3114 if (PyDict_SetItemString(d, "Store", (PyObject*)Store_type) < 0) return; |
| 3113 if(PyDict_SetItemString(d, "Del", (PyObject*)Del_type) < 0) return; | 3115 if (PyDict_SetItemString(d, "Del", (PyObject*)Del_type) < 0) return; |
| 3114 if(PyDict_SetItemString(d, "AugLoad", (PyObject*)AugLoad_type) < 0) | 3116 if (PyDict_SetItemString(d, "AugLoad", (PyObject*)AugLoad_type) < 0) |
| 3115 return; | 3117 return; |
| 3116 if(PyDict_SetItemString(d, "AugStore", (PyObject*)AugStore_type) < 0) | 3118 if (PyDict_SetItemString(d, "AugStore", (PyObject*)AugStore_type) < 0) |
| 3117 return; | 3119 return; |
| 3118 if(PyDict_SetItemString(d, "Param", (PyObject*)Param_type) < 0) return; | 3120 if (PyDict_SetItemString(d, "Param", (PyObject*)Param_type) < 0) return; |
| 3119 if(PyDict_SetItemString(d, "slice", (PyObject*)slice_type) < 0) return; | 3121 if (PyDict_SetItemString(d, "slice", (PyObject*)slice_type) < 0) return; |
| 3120 if(PyDict_SetItemString(d, "Ellipsis", (PyObject*)Ellipsis_type) < 0) | 3122 if (PyDict_SetItemString(d, "Ellipsis", (PyObject*)Ellipsis_type) < 0) |
| 3121 return; | 3123 return; |
| 3122 if(PyDict_SetItemString(d, "Slice", (PyObject*)Slice_type) < 0) return; | 3124 if (PyDict_SetItemString(d, "Slice", (PyObject*)Slice_type) < 0) return; |
| 3123 if(PyDict_SetItemString(d, "ExtSlice", (PyObject*)ExtSlice_type) < 0) | 3125 if (PyDict_SetItemString(d, "ExtSlice", (PyObject*)ExtSlice_type) < 0) |
| 3124 return; | 3126 return; |
| 3125 if(PyDict_SetItemString(d, "Index", (PyObject*)Index_type) < 0) return; | 3127 if (PyDict_SetItemString(d, "Index", (PyObject*)Index_type) < 0) return; |
| 3126 if(PyDict_SetItemString(d, "boolop", (PyObject*)boolop_type) < 0) | 3128 if (PyDict_SetItemString(d, "boolop", (PyObject*)boolop_type) < 0) |
| 3127 return; | 3129 return; |
| 3128 if(PyDict_SetItemString(d, "And", (PyObject*)And_type) < 0) return; | 3130 if (PyDict_SetItemString(d, "And", (PyObject*)And_type) < 0) return; |
| 3129 if(PyDict_SetItemString(d, "Or", (PyObject*)Or_type) < 0) return; | 3131 if (PyDict_SetItemString(d, "Or", (PyObject*)Or_type) < 0) return; |
| 3130 if(PyDict_SetItemString(d, "operator", (PyObject*)operator_type) < 0) | 3132 if (PyDict_SetItemString(d, "operator", (PyObject*)operator_type) < 0) |
| 3131 return; | 3133 return; |
| 3132 if(PyDict_SetItemString(d, "Add", (PyObject*)Add_type) < 0) return; | 3134 if (PyDict_SetItemString(d, "Add", (PyObject*)Add_type) < 0) return; |
| 3133 if(PyDict_SetItemString(d, "Sub", (PyObject*)Sub_type) < 0) return; | 3135 if (PyDict_SetItemString(d, "Sub", (PyObject*)Sub_type) < 0) return; |
| 3134 if(PyDict_SetItemString(d, "Mult", (PyObject*)Mult_type) < 0) return; | 3136 if (PyDict_SetItemString(d, "Mult", (PyObject*)Mult_type) < 0) return; |
| 3135 if(PyDict_SetItemString(d, "Div", (PyObject*)Div_type) < 0) return; | 3137 if (PyDict_SetItemString(d, "Div", (PyObject*)Div_type) < 0) return; |
| 3136 if(PyDict_SetItemString(d, "Mod", (PyObject*)Mod_type) < 0) return; | 3138 if (PyDict_SetItemString(d, "Mod", (PyObject*)Mod_type) < 0) return; |
| 3137 if(PyDict_SetItemString(d, "Pow", (PyObject*)Pow_type) < 0) return; | 3139 if (PyDict_SetItemString(d, "Pow", (PyObject*)Pow_type) < 0) return; |
| 3138 if(PyDict_SetItemString(d, "LShift", (PyObject*)LShift_type) < 0) | 3140 if (PyDict_SetItemString(d, "LShift", (PyObject*)LShift_type) < 0) |
| 3139 return; | 3141 return; |
| 3140 if(PyDict_SetItemString(d, "RShift", (PyObject*)RShift_type) < 0) | 3142 if (PyDict_SetItemString(d, "RShift", (PyObject*)RShift_type) < 0) |
| 3141 return; | 3143 return; |
| 3142 if(PyDict_SetItemString(d, "BitOr", (PyObject*)BitOr_type) < 0) return; | 3144 if (PyDict_SetItemString(d, "BitOr", (PyObject*)BitOr_type) < 0) return; |
| 3143 if(PyDict_SetItemString(d, "BitXor", (PyObject*)BitXor_type) < 0) | 3145 if (PyDict_SetItemString(d, "BitXor", (PyObject*)BitXor_type) < 0) |
| 3144 return; | 3146 return; |
| 3145 if(PyDict_SetItemString(d, "BitAnd", (PyObject*)BitAnd_type) < 0) | 3147 if (PyDict_SetItemString(d, "BitAnd", (PyObject*)BitAnd_type) < 0) |
| 3146 return; | 3148 return; |
| 3147 if(PyDict_SetItemString(d, "FloorDiv", (PyObject*)FloorDiv_type) < 0) | 3149 if (PyDict_SetItemString(d, "FloorDiv", (PyObject*)FloorDiv_type) < 0) |
| 3148 return; | 3150 return; |
| 3149 if(PyDict_SetItemString(d, "unaryop", (PyObject*)unaryop_type) < 0) | 3151 if (PyDict_SetItemString(d, "unaryop", (PyObject*)unaryop_type) < 0) |
| 3150 return; | 3152 return; |
| 3151 if(PyDict_SetItemString(d, "Invert", (PyObject*)Invert_type) < 0) | 3153 if (PyDict_SetItemString(d, "Invert", (PyObject*)Invert_type) < 0) |
| 3152 return; | 3154 return; |
| 3153 if(PyDict_SetItemString(d, "Not", (PyObject*)Not_type) < 0) return; | 3155 if (PyDict_SetItemString(d, "Not", (PyObject*)Not_type) < 0) return; |
| 3154 if(PyDict_SetItemString(d, "UAdd", (PyObject*)UAdd_type) < 0) return; | 3156 if (PyDict_SetItemString(d, "UAdd", (PyObject*)UAdd_type) < 0) return; |
| 3155 if(PyDict_SetItemString(d, "USub", (PyObject*)USub_type) < 0) return; | 3157 if (PyDict_SetItemString(d, "USub", (PyObject*)USub_type) < 0) return; |
| 3156 if(PyDict_SetItemString(d, "cmpop", (PyObject*)cmpop_type) < 0) return; | 3158 if (PyDict_SetItemString(d, "cmpop", (PyObject*)cmpop_type) < 0) return; |
| 3157 if(PyDict_SetItemString(d, "Eq", (PyObject*)Eq_type) < 0) return; | 3159 if (PyDict_SetItemString(d, "Eq", (PyObject*)Eq_type) < 0) return; |
| 3158 if(PyDict_SetItemString(d, "NotEq", (PyObject*)NotEq_type) < 0) return; | 3160 if (PyDict_SetItemString(d, "NotEq", (PyObject*)NotEq_type) < 0) return; |
| 3159 if(PyDict_SetItemString(d, "Lt", (PyObject*)Lt_type) < 0) return; | 3161 if (PyDict_SetItemString(d, "Lt", (PyObject*)Lt_type) < 0) return; |
| 3160 if(PyDict_SetItemString(d, "LtE", (PyObject*)LtE_type) < 0) return; | 3162 if (PyDict_SetItemString(d, "LtE", (PyObject*)LtE_type) < 0) return; |
| 3161 if(PyDict_SetItemString(d, "Gt", (PyObject*)Gt_type) < 0) return; | 3163 if (PyDict_SetItemString(d, "Gt", (PyObject*)Gt_type) < 0) return; |
| 3162 if(PyDict_SetItemString(d, "GtE", (PyObject*)GtE_type) < 0) return; | 3164 if (PyDict_SetItemString(d, "GtE", (PyObject*)GtE_type) < 0) return; |
| 3163 if(PyDict_SetItemString(d, "Is", (PyObject*)Is_type) < 0) return; | 3165 if (PyDict_SetItemString(d, "Is", (PyObject*)Is_type) < 0) return; |
| 3164 if(PyDict_SetItemString(d, "IsNot", (PyObject*)IsNot_type) < 0) return; | 3166 if (PyDict_SetItemString(d, "IsNot", (PyObject*)IsNot_type) < 0) return; |
| 3165 if(PyDict_SetItemString(d, "In", (PyObject*)In_type) < 0) return; | 3167 if (PyDict_SetItemString(d, "In", (PyObject*)In_type) < 0) return; |
| 3166 if(PyDict_SetItemString(d, "NotIn", (PyObject*)NotIn_type) < 0) return; | 3168 if (PyDict_SetItemString(d, "NotIn", (PyObject*)NotIn_type) < 0) return; |
| 3167 if(PyDict_SetItemString(d, "comprehension", | 3169 if (PyDict_SetItemString(d, "comprehension", |
| 3168 (PyObject*)comprehension_type) < 0) return; | 3170 (PyObject*)comprehension_type) < 0) return; |
| 3169 if(PyDict_SetItemString(d, "excepthandler", | 3171 if (PyDict_SetItemString(d, "excepthandler", |
| 3170 (PyObject*)excepthandler_type) < 0) return; | 3172 (PyObject*)excepthandler_type) < 0) return; |
| 3171 if(PyDict_SetItemString(d, "arguments", (PyObject*)arguments_type) < 0) | 3173 if (PyDict_SetItemString(d, "arguments", (PyObject*)arguments_type) < |
| 3172 return; | 3174 0) return; |
| 3173 if(PyDict_SetItemString(d, "keyword", (PyObject*)keyword_type) < 0) | 3175 if (PyDict_SetItemString(d, "keyword", (PyObject*)keyword_type) < 0) |
| 3174 return; | 3176 return; |
| 3175 if(PyDict_SetItemString(d, "alias", (PyObject*)alias_type) < 0) return; | 3177 if (PyDict_SetItemString(d, "alias", (PyObject*)alias_type) < 0) return; |
| 3176 } | 3178 } |
| 3177 | 3179 |
| 3178 | 3180 |
| 3179 PyObject* PyAST_mod2obj(mod_ty t) | 3181 PyObject* PyAST_mod2obj(mod_ty t) |
| 3180 { | 3182 { |
