diff Modules/parsermodule.c @ 28551:9acdc6c4416a legacy-trunk

Don't use (PyObject *)PyObject_Type(x). It is a leaky and verbose way of saying x->ob_type.
author Guido van Rossum <guido@python.org>
date Wed, 09 Apr 2003 17:53:22 +0000
parents c18422716ff2
children 1cbc6b7836dc
line wrap: on
line diff
--- a/Modules/parsermodule.c	Wed Apr 09 17:26:38 2003 +0000
+++ b/Modules/parsermodule.c	Wed Apr 09 17:53:22 2003 +0000
@@ -681,7 +681,7 @@
                 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 @@
                         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;