diff options
author | Georg Brandl <georg@python.org> | 2008-07-23 15:07:12 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-07-23 15:07:12 (GMT) |
commit | 30704ea0db31e48f115f85c2e61acee0edbce0c6 (patch) | |
tree | 312e85735a082a65699bfa74b523895585f56d3f /Modules/parsermodule.c | |
parent | 4dcce175e2844db556db4b32c5035e5d942bec6f (diff) | |
download | cpython-30704ea0db31e48f115f85c2e61acee0edbce0c6.zip cpython-30704ea0db31e48f115f85c2e61acee0edbce0c6.tar.gz cpython-30704ea0db31e48f115f85c2e61acee0edbce0c6.tar.bz2 |
Remove "ast" aliases from the parser module.
Diffstat (limited to 'Modules/parsermodule.c')
-rw-r--r-- | Modules/parsermodule.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c index ab41aaf..4056816 100644 --- a/Modules/parsermodule.c +++ b/Modules/parsermodule.c @@ -322,7 +322,7 @@ parser_st2tuple(PyST_Object *self, PyObject *args, PyObject *kw) 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 @@ parser_st2list(PyST_Object *self, PyObject *args, PyObject *kw) 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 @@ parser_compilest(PyST_Object *self, PyObject *args, PyObject *kw) 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 @@ parser_isexpr(PyST_Object *self, PyObject *args, PyObject *kw) 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 @@ parser_issuite(PyST_Object *self, PyObject *args, PyObject *kw) 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 @@ parser__pickler(PyObject *self, PyObject *args) * 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 @@ static PyMethodDef parser_functions[] = { 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 @@ PyInit_parser(void) 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__", |