[Python-checkins] python/dist/src/Objects typeobject.c,2.245,2.246

gvanrossum at users.sourceforge.net gvanrossum at users.sourceforge.net
Wed Oct 8 23:46:38 EDT 2003


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

Modified Files:
	typeobject.c 
Log Message:
Fix leak introduced by previous typeobject.c checkin.

Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.245
retrieving revision 2.246
diff -C2 -d -r2.245 -r2.246
*** typeobject.c	8 Oct 2003 21:05:38 -0000	2.245
--- typeobject.c	9 Oct 2003 03:46:35 -0000	2.246
***************
*** 3570,3574 ****
  	objobjproc func = (objobjproc)wrapped;
  	int res;
! 	PyObject *value, *ret;
  
  	if (!PyArg_ParseTuple(args, "O", &value))
--- 3570,3574 ----
  	objobjproc func = (objobjproc)wrapped;
  	int res;
! 	PyObject *value;
  
  	if (!PyArg_ParseTuple(args, "O", &value))
***************
*** 3577,3583 ****
  	if (res == -1 && PyErr_Occurred())
  		return NULL;
! 	ret = PyObject_IsTrue(PyInt_FromLong((long)res)) ? Py_True : Py_False;
! 	Py_INCREF(ret);
! 	return ret;
  }
  
--- 3577,3582 ----
  	if (res == -1 && PyErr_Occurred())
  		return NULL;
! 	else
! 		return PyBool_FromLong(res);
  }
  





More information about the Python-checkins mailing list