comparison Python/Python-ast.c @ 47580:94f64f11fdd0

Implement PEP 3121: new module initialization and finalization API.
author Martin v. Löwis <martin@v.loewis.de>
date Wed, 11 Jun 2008 05:26:20 +0000
parents 23ab586c427a
children 6ae2d4b507a2
comparison
equal deleted inserted replaced
47579:e81deccb17c6 47580:94f64f11fdd0
6382 Py_XDECREF(tmp); 6382 Py_XDECREF(tmp);
6383 return 1; 6383 return 1;
6384 } 6384 }
6385 6385
6386 6386
6387 static struct PyModuleDef _astmodule = {
6388 PyModuleDef_HEAD_INIT, "_ast"
6389 };
6387 PyMODINIT_FUNC 6390 PyMODINIT_FUNC
6388 init_ast(void) 6391 PyInit__ast(void)
6389 { 6392 {
6390 PyObject *m, *d; 6393 PyObject *m, *d;
6391 if (!init_types()) return; 6394 if (!init_types()) return NULL;
6392 m = Py_InitModule3("_ast", NULL, NULL); 6395 m = PyModule_Create(&_astmodule);
6393 if (!m) return; 6396 if (!m) return NULL;
6394 d = PyModule_GetDict(m); 6397 d = PyModule_GetDict(m);
6395 if (PyDict_SetItemString(d, "AST", (PyObject*)&AST_type) < 0) return; 6398 if (PyDict_SetItemString(d, "AST", (PyObject*)&AST_type) < 0) return
6399 NULL;
6396 if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0) 6400 if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0)
6397 return; 6401 return NULL;
6398 if (PyModule_AddStringConstant(m, "__version__", "62078") < 0) 6402 if (PyModule_AddStringConstant(m, "__version__", "62078") < 0)
6399 return; 6403 return NULL;
6400 if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return; 6404 if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return
6405 NULL;
6401 if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0) 6406 if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0)
6402 return; 6407 return NULL;
6403 if (PyDict_SetItemString(d, "Interactive", (PyObject*)Interactive_type) 6408 if (PyDict_SetItemString(d, "Interactive", (PyObject*)Interactive_type)
6404 < 0) return; 6409 < 0) return NULL;
6405 if (PyDict_SetItemString(d, "Expression", (PyObject*)Expression_type) < 6410 if (PyDict_SetItemString(d, "Expression", (PyObject*)Expression_type) <
6406 0) return; 6411 0) return NULL;
6407 if (PyDict_SetItemString(d, "Suite", (PyObject*)Suite_type) < 0) return; 6412 if (PyDict_SetItemString(d, "Suite", (PyObject*)Suite_type) < 0) return
6408 if (PyDict_SetItemString(d, "stmt", (PyObject*)stmt_type) < 0) return; 6413 NULL;
6414 if (PyDict_SetItemString(d, "stmt", (PyObject*)stmt_type) < 0) return
6415 NULL;
6409 if (PyDict_SetItemString(d, "FunctionDef", (PyObject*)FunctionDef_type) 6416 if (PyDict_SetItemString(d, "FunctionDef", (PyObject*)FunctionDef_type)
6410 < 0) return; 6417 < 0) return NULL;
6411 if (PyDict_SetItemString(d, "ClassDef", (PyObject*)ClassDef_type) < 0) 6418 if (PyDict_SetItemString(d, "ClassDef", (PyObject*)ClassDef_type) < 0)
6412 return; 6419 return NULL;
6413 if (PyDict_SetItemString(d, "Return", (PyObject*)Return_type) < 0) 6420 if (PyDict_SetItemString(d, "Return", (PyObject*)Return_type) < 0)
6414 return; 6421 return NULL;
6415 if (PyDict_SetItemString(d, "Delete", (PyObject*)Delete_type) < 0) 6422 if (PyDict_SetItemString(d, "Delete", (PyObject*)Delete_type) < 0)
6416 return; 6423 return NULL;
6417 if (PyDict_SetItemString(d, "Assign", (PyObject*)Assign_type) < 0) 6424 if (PyDict_SetItemString(d, "Assign", (PyObject*)Assign_type) < 0)
6418 return; 6425 return NULL;
6419 if (PyDict_SetItemString(d, "AugAssign", (PyObject*)AugAssign_type) < 6426 if (PyDict_SetItemString(d, "AugAssign", (PyObject*)AugAssign_type) <
6420 0) return; 6427 0) return NULL;
6421 if (PyDict_SetItemString(d, "For", (PyObject*)For_type) < 0) return; 6428 if (PyDict_SetItemString(d, "For", (PyObject*)For_type) < 0) return
6422 if (PyDict_SetItemString(d, "While", (PyObject*)While_type) < 0) return; 6429 NULL;
6423 if (PyDict_SetItemString(d, "If", (PyObject*)If_type) < 0) return; 6430 if (PyDict_SetItemString(d, "While", (PyObject*)While_type) < 0) return
6424 if (PyDict_SetItemString(d, "With", (PyObject*)With_type) < 0) return; 6431 NULL;
6425 if (PyDict_SetItemString(d, "Raise", (PyObject*)Raise_type) < 0) return; 6432 if (PyDict_SetItemString(d, "If", (PyObject*)If_type) < 0) return NULL;
6433 if (PyDict_SetItemString(d, "With", (PyObject*)With_type) < 0) return
6434 NULL;
6435 if (PyDict_SetItemString(d, "Raise", (PyObject*)Raise_type) < 0) return
6436 NULL;
6426 if (PyDict_SetItemString(d, "TryExcept", (PyObject*)TryExcept_type) < 6437 if (PyDict_SetItemString(d, "TryExcept", (PyObject*)TryExcept_type) <
6427 0) return; 6438 0) return NULL;
6428 if (PyDict_SetItemString(d, "TryFinally", (PyObject*)TryFinally_type) < 6439 if (PyDict_SetItemString(d, "TryFinally", (PyObject*)TryFinally_type) <
6429 0) return; 6440 0) return NULL;
6430 if (PyDict_SetItemString(d, "Assert", (PyObject*)Assert_type) < 0) 6441 if (PyDict_SetItemString(d, "Assert", (PyObject*)Assert_type) < 0)
6431 return; 6442 return NULL;
6432 if (PyDict_SetItemString(d, "Import", (PyObject*)Import_type) < 0) 6443 if (PyDict_SetItemString(d, "Import", (PyObject*)Import_type) < 0)
6433 return; 6444 return NULL;
6434 if (PyDict_SetItemString(d, "ImportFrom", (PyObject*)ImportFrom_type) < 6445 if (PyDict_SetItemString(d, "ImportFrom", (PyObject*)ImportFrom_type) <
6435 0) return; 6446 0) return NULL;
6436 if (PyDict_SetItemString(d, "Global", (PyObject*)Global_type) < 0) 6447 if (PyDict_SetItemString(d, "Global", (PyObject*)Global_type) < 0)
6437 return; 6448 return NULL;
6438 if (PyDict_SetItemString(d, "Nonlocal", (PyObject*)Nonlocal_type) < 0) 6449 if (PyDict_SetItemString(d, "Nonlocal", (PyObject*)Nonlocal_type) < 0)
6439 return; 6450 return NULL;
6440 if (PyDict_SetItemString(d, "Expr", (PyObject*)Expr_type) < 0) return; 6451 if (PyDict_SetItemString(d, "Expr", (PyObject*)Expr_type) < 0) return
6441 if (PyDict_SetItemString(d, "Pass", (PyObject*)Pass_type) < 0) return; 6452 NULL;
6442 if (PyDict_SetItemString(d, "Break", (PyObject*)Break_type) < 0) return; 6453 if (PyDict_SetItemString(d, "Pass", (PyObject*)Pass_type) < 0) return
6454 NULL;
6455 if (PyDict_SetItemString(d, "Break", (PyObject*)Break_type) < 0) return
6456 NULL;
6443 if (PyDict_SetItemString(d, "Continue", (PyObject*)Continue_type) < 0) 6457 if (PyDict_SetItemString(d, "Continue", (PyObject*)Continue_type) < 0)
6444 return; 6458 return NULL;
6445 if (PyDict_SetItemString(d, "expr", (PyObject*)expr_type) < 0) return; 6459 if (PyDict_SetItemString(d, "expr", (PyObject*)expr_type) < 0) return
6460 NULL;
6446 if (PyDict_SetItemString(d, "BoolOp", (PyObject*)BoolOp_type) < 0) 6461 if (PyDict_SetItemString(d, "BoolOp", (PyObject*)BoolOp_type) < 0)
6447 return; 6462 return NULL;
6448 if (PyDict_SetItemString(d, "BinOp", (PyObject*)BinOp_type) < 0) return; 6463 if (PyDict_SetItemString(d, "BinOp", (PyObject*)BinOp_type) < 0) return
6464 NULL;
6449 if (PyDict_SetItemString(d, "UnaryOp", (PyObject*)UnaryOp_type) < 0) 6465 if (PyDict_SetItemString(d, "UnaryOp", (PyObject*)UnaryOp_type) < 0)
6450 return; 6466 return NULL;
6451 if (PyDict_SetItemString(d, "Lambda", (PyObject*)Lambda_type) < 0) 6467 if (PyDict_SetItemString(d, "Lambda", (PyObject*)Lambda_type) < 0)
6452 return; 6468 return NULL;
6453 if (PyDict_SetItemString(d, "IfExp", (PyObject*)IfExp_type) < 0) return; 6469 if (PyDict_SetItemString(d, "IfExp", (PyObject*)IfExp_type) < 0) return
6454 if (PyDict_SetItemString(d, "Dict", (PyObject*)Dict_type) < 0) return; 6470 NULL;
6455 if (PyDict_SetItemString(d, "Set", (PyObject*)Set_type) < 0) return; 6471 if (PyDict_SetItemString(d, "Dict", (PyObject*)Dict_type) < 0) return
6472 NULL;
6473 if (PyDict_SetItemString(d, "Set", (PyObject*)Set_type) < 0) return
6474 NULL;
6456 if (PyDict_SetItemString(d, "ListComp", (PyObject*)ListComp_type) < 0) 6475 if (PyDict_SetItemString(d, "ListComp", (PyObject*)ListComp_type) < 0)
6457 return; 6476 return NULL;
6458 if (PyDict_SetItemString(d, "SetComp", (PyObject*)SetComp_type) < 0) 6477 if (PyDict_SetItemString(d, "SetComp", (PyObject*)SetComp_type) < 0)
6459 return; 6478 return NULL;
6460 if (PyDict_SetItemString(d, "DictComp", (PyObject*)DictComp_type) < 0) 6479 if (PyDict_SetItemString(d, "DictComp", (PyObject*)DictComp_type) < 0)
6461 return; 6480 return NULL;
6462 if (PyDict_SetItemString(d, "GeneratorExp", 6481 if (PyDict_SetItemString(d, "GeneratorExp",
6463 (PyObject*)GeneratorExp_type) < 0) return; 6482 (PyObject*)GeneratorExp_type) < 0) return NULL;
6464 if (PyDict_SetItemString(d, "Yield", (PyObject*)Yield_type) < 0) return; 6483 if (PyDict_SetItemString(d, "Yield", (PyObject*)Yield_type) < 0) return
6484 NULL;
6465 if (PyDict_SetItemString(d, "Compare", (PyObject*)Compare_type) < 0) 6485 if (PyDict_SetItemString(d, "Compare", (PyObject*)Compare_type) < 0)
6466 return; 6486 return NULL;
6467 if (PyDict_SetItemString(d, "Call", (PyObject*)Call_type) < 0) return; 6487 if (PyDict_SetItemString(d, "Call", (PyObject*)Call_type) < 0) return
6468 if (PyDict_SetItemString(d, "Num", (PyObject*)Num_type) < 0) return; 6488 NULL;
6469 if (PyDict_SetItemString(d, "Str", (PyObject*)Str_type) < 0) return; 6489 if (PyDict_SetItemString(d, "Num", (PyObject*)Num_type) < 0) return
6470 if (PyDict_SetItemString(d, "Bytes", (PyObject*)Bytes_type) < 0) return; 6490 NULL;
6491 if (PyDict_SetItemString(d, "Str", (PyObject*)Str_type) < 0) return
6492 NULL;
6493 if (PyDict_SetItemString(d, "Bytes", (PyObject*)Bytes_type) < 0) return
6494 NULL;
6471 if (PyDict_SetItemString(d, "Ellipsis", (PyObject*)Ellipsis_type) < 0) 6495 if (PyDict_SetItemString(d, "Ellipsis", (PyObject*)Ellipsis_type) < 0)
6472 return; 6496 return NULL;
6473 if (PyDict_SetItemString(d, "Attribute", (PyObject*)Attribute_type) < 6497 if (PyDict_SetItemString(d, "Attribute", (PyObject*)Attribute_type) <
6474 0) return; 6498 0) return NULL;
6475 if (PyDict_SetItemString(d, "Subscript", (PyObject*)Subscript_type) < 6499 if (PyDict_SetItemString(d, "Subscript", (PyObject*)Subscript_type) <
6476 0) return; 6500 0) return NULL;
6477 if (PyDict_SetItemString(d, "Starred", (PyObject*)Starred_type) < 0) 6501 if (PyDict_SetItemString(d, "Starred", (PyObject*)Starred_type) < 0)
6478 return; 6502 return NULL;
6479 if (PyDict_SetItemString(d, "Name", (PyObject*)Name_type) < 0) return; 6503 if (PyDict_SetItemString(d, "Name", (PyObject*)Name_type) < 0) return
6480 if (PyDict_SetItemString(d, "List", (PyObject*)List_type) < 0) return; 6504 NULL;
6481 if (PyDict_SetItemString(d, "Tuple", (PyObject*)Tuple_type) < 0) return; 6505 if (PyDict_SetItemString(d, "List", (PyObject*)List_type) < 0) return
6506 NULL;
6507 if (PyDict_SetItemString(d, "Tuple", (PyObject*)Tuple_type) < 0) return
6508 NULL;
6482 if (PyDict_SetItemString(d, "expr_context", 6509 if (PyDict_SetItemString(d, "expr_context",
6483 (PyObject*)expr_context_type) < 0) return; 6510 (PyObject*)expr_context_type) < 0) return NULL;
6484 if (PyDict_SetItemString(d, "Load", (PyObject*)Load_type) < 0) return; 6511 if (PyDict_SetItemString(d, "Load", (PyObject*)Load_type) < 0) return
6485 if (PyDict_SetItemString(d, "Store", (PyObject*)Store_type) < 0) return; 6512 NULL;
6486 if (PyDict_SetItemString(d, "Del", (PyObject*)Del_type) < 0) return; 6513 if (PyDict_SetItemString(d, "Store", (PyObject*)Store_type) < 0) return
6514 NULL;
6515 if (PyDict_SetItemString(d, "Del", (PyObject*)Del_type) < 0) return
6516 NULL;
6487 if (PyDict_SetItemString(d, "AugLoad", (PyObject*)AugLoad_type) < 0) 6517 if (PyDict_SetItemString(d, "AugLoad", (PyObject*)AugLoad_type) < 0)
6488 return; 6518 return NULL;
6489 if (PyDict_SetItemString(d, "AugStore", (PyObject*)AugStore_type) < 0) 6519 if (PyDict_SetItemString(d, "AugStore", (PyObject*)AugStore_type) < 0)
6490 return; 6520 return NULL;
6491 if (PyDict_SetItemString(d, "Param", (PyObject*)Param_type) < 0) return; 6521 if (PyDict_SetItemString(d, "Param", (PyObject*)Param_type) < 0) return
6492 if (PyDict_SetItemString(d, "slice", (PyObject*)slice_type) < 0) return; 6522 NULL;
6493 if (PyDict_SetItemString(d, "Slice", (PyObject*)Slice_type) < 0) return; 6523 if (PyDict_SetItemString(d, "slice", (PyObject*)slice_type) < 0) return
6524 NULL;
6525 if (PyDict_SetItemString(d, "Slice", (PyObject*)Slice_type) < 0) return
6526 NULL;
6494 if (PyDict_SetItemString(d, "ExtSlice", (PyObject*)ExtSlice_type) < 0) 6527 if (PyDict_SetItemString(d, "ExtSlice", (PyObject*)ExtSlice_type) < 0)
6495 return; 6528 return NULL;
6496 if (PyDict_SetItemString(d, "Index", (PyObject*)Index_type) < 0) return; 6529 if (PyDict_SetItemString(d, "Index", (PyObject*)Index_type) < 0) return
6530 NULL;
6497 if (PyDict_SetItemString(d, "boolop", (PyObject*)boolop_type) < 0) 6531 if (PyDict_SetItemString(d, "boolop", (PyObject*)boolop_type) < 0)
6498 return; 6532 return NULL;
6499 if (PyDict_SetItemString(d, "And", (PyObject*)And_type) < 0) return; 6533 if (PyDict_SetItemString(d, "And", (PyObject*)And_type) < 0) return
6500 if (PyDict_SetItemString(d, "Or", (PyObject*)Or_type) < 0) return; 6534 NULL;
6535 if (PyDict_SetItemString(d, "Or", (PyObject*)Or_type) < 0) return NULL;
6501 if (PyDict_SetItemString(d, "operator", (PyObject*)operator_type) < 0) 6536 if (PyDict_SetItemString(d, "operator", (PyObject*)operator_type) < 0)
6502 return; 6537 return NULL;
6503 if (PyDict_SetItemString(d, "Add", (PyObject*)Add_type) < 0) return; 6538 if (PyDict_SetItemString(d, "Add", (PyObject*)Add_type) < 0) return
6504 if (PyDict_SetItemString(d, "Sub", (PyObject*)Sub_type) < 0) return; 6539 NULL;
6505 if (PyDict_SetItemString(d, "Mult", (PyObject*)Mult_type) < 0) return; 6540 if (PyDict_SetItemString(d, "Sub", (PyObject*)Sub_type) < 0) return
6506 if (PyDict_SetItemString(d, "Div", (PyObject*)Div_type) < 0) return; 6541 NULL;
6507 if (PyDict_SetItemString(d, "Mod", (PyObject*)Mod_type) < 0) return; 6542 if (PyDict_SetItemString(d, "Mult", (PyObject*)Mult_type) < 0) return
6508 if (PyDict_SetItemString(d, "Pow", (PyObject*)Pow_type) < 0) return; 6543 NULL;
6544 if (PyDict_SetItemString(d, "Div", (PyObject*)Div_type) < 0) return
6545 NULL;
6546 if (PyDict_SetItemString(d, "Mod", (PyObject*)Mod_type) < 0) return
6547 NULL;
6548 if (PyDict_SetItemString(d, "Pow", (PyObject*)Pow_type) < 0) return
6549 NULL;
6509 if (PyDict_SetItemString(d, "LShift", (PyObject*)LShift_type) < 0) 6550 if (PyDict_SetItemString(d, "LShift", (PyObject*)LShift_type) < 0)
6510 return; 6551 return NULL;
6511 if (PyDict_SetItemString(d, "RShift", (PyObject*)RShift_type) < 0) 6552 if (PyDict_SetItemString(d, "RShift", (PyObject*)RShift_type) < 0)
6512 return; 6553 return NULL;
6513 if (PyDict_SetItemString(d, "BitOr", (PyObject*)BitOr_type) < 0) return; 6554 if (PyDict_SetItemString(d, "BitOr", (PyObject*)BitOr_type) < 0) return
6555 NULL;
6514 if (PyDict_SetItemString(d, "BitXor", (PyObject*)BitXor_type) < 0) 6556 if (PyDict_SetItemString(d, "BitXor", (PyObject*)BitXor_type) < 0)
6515 return; 6557 return NULL;
6516 if (PyDict_SetItemString(d, "BitAnd", (PyObject*)BitAnd_type) < 0) 6558 if (PyDict_SetItemString(d, "BitAnd", (PyObject*)BitAnd_type) < 0)
6517 return; 6559 return NULL;
6518 if (PyDict_SetItemString(d, "FloorDiv", (PyObject*)FloorDiv_type) < 0) 6560 if (PyDict_SetItemString(d, "FloorDiv", (PyObject*)FloorDiv_type) < 0)
6519 return; 6561 return NULL;
6520 if (PyDict_SetItemString(d, "unaryop", (PyObject*)unaryop_type) < 0) 6562 if (PyDict_SetItemString(d, "unaryop", (PyObject*)unaryop_type) < 0)
6521 return; 6563 return NULL;
6522 if (PyDict_SetItemString(d, "Invert", (PyObject*)Invert_type) < 0) 6564 if (PyDict_SetItemString(d, "Invert", (PyObject*)Invert_type) < 0)
6523 return; 6565 return NULL;
6524 if (PyDict_SetItemString(d, "Not", (PyObject*)Not_type) < 0) return; 6566 if (PyDict_SetItemString(d, "Not", (PyObject*)Not_type) < 0) return
6525 if (PyDict_SetItemString(d, "UAdd", (PyObject*)UAdd_type) < 0) return; 6567 NULL;
6526 if (PyDict_SetItemString(d, "USub", (PyObject*)USub_type) < 0) return; 6568 if (PyDict_SetItemString(d, "UAdd", (PyObject*)UAdd_type) < 0) return
6527 if (PyDict_SetItemString(d, "cmpop", (PyObject*)cmpop_type) < 0) return; 6569 NULL;
6528 if (PyDict_SetItemString(d, "Eq", (PyObject*)Eq_type) < 0) return; 6570 if (PyDict_SetItemString(d, "USub", (PyObject*)USub_type) < 0) return
6529 if (PyDict_SetItemString(d, "NotEq", (PyObject*)NotEq_type) < 0) return; 6571 NULL;
6530 if (PyDict_SetItemString(d, "Lt", (PyObject*)Lt_type) < 0) return; 6572 if (PyDict_SetItemString(d, "cmpop", (PyObject*)cmpop_type) < 0) return
6531 if (PyDict_SetItemString(d, "LtE", (PyObject*)LtE_type) < 0) return; 6573 NULL;
6532 if (PyDict_SetItemString(d, "Gt", (PyObject*)Gt_type) < 0) return; 6574 if (PyDict_SetItemString(d, "Eq", (PyObject*)Eq_type) < 0) return NULL;
6533 if (PyDict_SetItemString(d, "GtE", (PyObject*)GtE_type) < 0) return; 6575 if (PyDict_SetItemString(d, "NotEq", (PyObject*)NotEq_type) < 0) return
6534 if (PyDict_SetItemString(d, "Is", (PyObject*)Is_type) < 0) return; 6576 NULL;
6535 if (PyDict_SetItemString(d, "IsNot", (PyObject*)IsNot_type) < 0) return; 6577 if (PyDict_SetItemString(d, "Lt", (PyObject*)Lt_type) < 0) return NULL;
6536 if (PyDict_SetItemString(d, "In", (PyObject*)In_type) < 0) return; 6578 if (PyDict_SetItemString(d, "LtE", (PyObject*)LtE_type) < 0) return
6537 if (PyDict_SetItemString(d, "NotIn", (PyObject*)NotIn_type) < 0) return; 6579 NULL;
6580 if (PyDict_SetItemString(d, "Gt", (PyObject*)Gt_type) < 0) return NULL;
6581 if (PyDict_SetItemString(d, "GtE", (PyObject*)GtE_type) < 0) return
6582 NULL;
6583 if (PyDict_SetItemString(d, "Is", (PyObject*)Is_type) < 0) return NULL;
6584 if (PyDict_SetItemString(d, "IsNot", (PyObject*)IsNot_type) < 0) return
6585 NULL;
6586 if (PyDict_SetItemString(d, "In", (PyObject*)In_type) < 0) return NULL;
6587 if (PyDict_SetItemString(d, "NotIn", (PyObject*)NotIn_type) < 0) return
6588 NULL;
6538 if (PyDict_SetItemString(d, "comprehension", 6589 if (PyDict_SetItemString(d, "comprehension",
6539 (PyObject*)comprehension_type) < 0) return; 6590 (PyObject*)comprehension_type) < 0) return NULL;
6540 if (PyDict_SetItemString(d, "excepthandler", 6591 if (PyDict_SetItemString(d, "excepthandler",
6541 (PyObject*)excepthandler_type) < 0) return; 6592 (PyObject*)excepthandler_type) < 0) return NULL;
6542 if (PyDict_SetItemString(d, "ExceptHandler", 6593 if (PyDict_SetItemString(d, "ExceptHandler",
6543 (PyObject*)ExceptHandler_type) < 0) return; 6594 (PyObject*)ExceptHandler_type) < 0) return NULL;
6544 if (PyDict_SetItemString(d, "arguments", (PyObject*)arguments_type) < 6595 if (PyDict_SetItemString(d, "arguments", (PyObject*)arguments_type) <
6545 0) return; 6596 0) return NULL;
6546 if (PyDict_SetItemString(d, "arg", (PyObject*)arg_type) < 0) return; 6597 if (PyDict_SetItemString(d, "arg", (PyObject*)arg_type) < 0) return
6598 NULL;
6547 if (PyDict_SetItemString(d, "keyword", (PyObject*)keyword_type) < 0) 6599 if (PyDict_SetItemString(d, "keyword", (PyObject*)keyword_type) < 0)
6548 return; 6600 return NULL;
6549 if (PyDict_SetItemString(d, "alias", (PyObject*)alias_type) < 0) return; 6601 if (PyDict_SetItemString(d, "alias", (PyObject*)alias_type) < 0) return
6602 NULL;
6603 return m;
6550 } 6604 }
6551 6605
6552 6606
6553 PyObject* PyAST_mod2obj(mod_ty t) 6607 PyObject* PyAST_mod2obj(mod_ty t)
6554 { 6608 {