Mercurial > cpython-lru_cache-weakref
diff Modules/parsermodule.c @ 48558:fcbd9f4f095c
Remove "ast" aliases from the parser module.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Wed, 23 Jul 2008 15:07:12 +0000 |
| parents | 7e56016a6565 |
| children | 85b67fb5672b |
line wrap: on
line diff
--- a/Modules/parsermodule.c Wed Jul 23 13:47:41 2008 +0000 +++ b/Modules/parsermodule.c Wed Jul 23 15:07:12 2008 +0000 @@ -322,7 +322,7 @@ PyObject *res = 0; int ok; - static char *keywords[] = {"ast", "line_info", "col_info", NULL}; + static char *keywords[] = {"st", "line_info", "col_info", NULL}; if (self == NULL || PyModule_Check(self)) { ok = PyArg_ParseTupleAndKeywords(args, kw, "O!|OO:st2tuple", keywords, @@ -366,7 +366,7 @@ PyObject *res = 0; int ok; - static char *keywords[] = {"ast", "line_info", "col_info", NULL}; + static char *keywords[] = {"st", "line_info", "col_info", NULL}; if (self == NULL || PyModule_Check(self)) ok = PyArg_ParseTupleAndKeywords(args, kw, "O!|OO:st2list", keywords, @@ -408,7 +408,7 @@ char* str = "<syntax-tree>"; int ok; - static char *keywords[] = {"ast", "filename", NULL}; + static char *keywords[] = {"st", "filename", NULL}; if (self == NULL || PyModule_Check(self)) ok = PyArg_ParseTupleAndKeywords(args, kw, "O!|s:compilest", keywords, @@ -437,7 +437,7 @@ PyObject* res = 0; int ok; - static char *keywords[] = {"ast", NULL}; + static char *keywords[] = {"st", NULL}; if (self == NULL || PyModule_Check(self)) ok = PyArg_ParseTupleAndKeywords(args, kw, "O!:isexpr", keywords, @@ -460,7 +460,7 @@ PyObject* res = 0; int ok; - static char *keywords[] = {"ast", NULL}; + static char *keywords[] = {"st", NULL}; if (self == NULL || PyModule_Check(self)) ok = PyArg_ParseTupleAndKeywords(args, kw, "O!:issuite", keywords, @@ -3011,12 +3011,6 @@ * inheritance. */ static PyMethodDef parser_functions[] = { - {"ast2tuple", (PyCFunction)parser_st2tuple, PUBLIC_METHOD_TYPE, - PyDoc_STR("Creates a tuple-tree representation of an ST.")}, - {"ast2list", (PyCFunction)parser_st2list, PUBLIC_METHOD_TYPE, - PyDoc_STR("Creates a list-tree representation of an ST.")}, - {"compileast", (PyCFunction)parser_compilest, PUBLIC_METHOD_TYPE, - PyDoc_STR("Compiles an ST object into a code object.")}, {"compilest", (PyCFunction)parser_compilest, PUBLIC_METHOD_TYPE, PyDoc_STR("Compiles an ST object into a code object.")}, {"expr", (PyCFunction)parser_expr, PUBLIC_METHOD_TYPE, @@ -3027,16 +3021,12 @@ PyDoc_STR("Determines if an ST object was created from a suite.")}, {"suite", (PyCFunction)parser_suite, PUBLIC_METHOD_TYPE, PyDoc_STR("Creates an ST object from a suite.")}, - {"sequence2ast", (PyCFunction)parser_tuple2st, PUBLIC_METHOD_TYPE, - PyDoc_STR("Creates an ST object from a tree representation.")}, {"sequence2st", (PyCFunction)parser_tuple2st, PUBLIC_METHOD_TYPE, PyDoc_STR("Creates an ST object from a tree representation.")}, {"st2tuple", (PyCFunction)parser_st2tuple, PUBLIC_METHOD_TYPE, PyDoc_STR("Creates a tuple-tree representation of an ST.")}, {"st2list", (PyCFunction)parser_st2list, PUBLIC_METHOD_TYPE, PyDoc_STR("Creates a list-tree representation of an ST.")}, - {"tuple2ast", (PyCFunction)parser_tuple2st, PUBLIC_METHOD_TYPE, - PyDoc_STR("Creates an ST object from a tree representation.")}, {"tuple2st", (PyCFunction)parser_tuple2st, PUBLIC_METHOD_TYPE, PyDoc_STR("Creates an ST object from a tree representation.")}, @@ -3090,8 +3080,6 @@ return NULL; Py_INCREF(&PyST_Type); - PyModule_AddObject(module, "ASTType", (PyObject*)&PyST_Type); - Py_INCREF(&PyST_Type); PyModule_AddObject(module, "STType", (PyObject*)&PyST_Type); PyModule_AddStringConstant(module, "__copyright__",
