summaryrefslogtreecommitdiffstats
path: root/Modules/parsermodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-04-09 17:53:22 (GMT)
committerGuido van Rossum <guido@python.org>2003-04-09 17:53:22 (GMT)
commitfc29646a2ee942e39a431d7240ee30f91f2436d3 (patch)
treeb8f9a5b49d98a4f91f3623ffb9bf65339fcac2b8 /Modules/parsermodule.c
parenta6b1c75b7ae2b0b22a37e52b0af24f2f82eddace (diff)
downloadcpython-fc29646a2ee942e39a431d7240ee30f91f2436d3.zip
cpython-fc29646a2ee942e39a431d7240ee30f91f2436d3.tar.gz
cpython-fc29646a2ee942e39a431d7240ee30f91f2436d3.tar.bz2
Don't use (PyObject *)PyObject_Type(x). It is a leaky and verbose way
of saying x->ob_type.
Diffstat (limited to 'Modules/parsermodule.c')
-rw-r--r--Modules/parsermodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
index eb9599c..91f15e3 100644
--- a/Modules/parsermodule.c
+++ b/Modules/parsermodule.c
@@ -681,7 +681,7 @@ build_node_children(PyObject *tuple, node *root, int *line_num)
PyErr_Format(parser_error,
"second item in terminal node must be a string,"
" found %s",
- ((PyTypeObject*)PyObject_Type(temp))->tp_name);
+ temp->ob_type->tp_name);
Py_DECREF(temp);
return 0;
}
@@ -694,7 +694,7 @@ build_node_children(PyObject *tuple, node *root, int *line_num)
PyErr_Format(parser_error,
"third item in terminal node must be an"
" integer, found %s",
- ((PyTypeObject*)PyObject_Type(temp))->tp_name);
+ temp->ob_type->tp_name);
Py_DECREF(o);
Py_DECREF(temp);
return 0;