[Python-checkins] python/dist/src/Modules parsermodule.c,2.78,2.79

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Wed, 09 Apr 2003 10:53:25 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv16531

Modified Files:
	parsermodule.c 
Log Message:
Don't use (PyObject *)PyObject_Type(x).  It is a leaky and verbose way
of saying x->ob_type.


Index: parsermodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v
retrieving revision 2.78
retrieving revision 2.79
diff -C2 -d -r2.78 -r2.79
*** parsermodule.c	10 Feb 2003 01:08:50 -0000	2.78
--- parsermodule.c	9 Apr 2003 17:53:22 -0000	2.79
***************
*** 682,686 ****
                               "second item in terminal node must be a string,"
                               " found %s",
!                              ((PyTypeObject*)PyObject_Type(temp))->tp_name);
                  Py_DECREF(temp);
                  return 0;
--- 682,686 ----
                               "second item in terminal node must be a string,"
                               " found %s",
!                              temp->ob_type->tp_name);
                  Py_DECREF(temp);
                  return 0;
***************
*** 695,699 ****
                                       "third item in terminal node must be an"
                                       " integer, found %s",
!                                 ((PyTypeObject*)PyObject_Type(temp))->tp_name);
                          Py_DECREF(o);
                          Py_DECREF(temp);
--- 695,699 ----
                                       "third item in terminal node must be an"
                                       " integer, found %s",
! 				     temp->ob_type->tp_name);
                          Py_DECREF(o);
                          Py_DECREF(temp);