]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport reference leak fix from HEAD revision 1.79.
authorFred Drake <fdrake@acm.org>
Wed, 9 Apr 2003 18:19:24 +0000 (18:19 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 9 Apr 2003 18:19:24 +0000 (18:19 +0000)
Modules/parsermodule.c

index 945c9231bf575ef5b72d8b4e00d7ad2b08ef7bda..0641e8b3e5bc4e556cf9248aa1459259afdf0476 100644 (file)
@@ -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;