A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-October/038602.html below:

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

[Python-Dev] RE: [Python-checkins] python/dist/src/Objects typeobject.c, 2.244, 2.245 [Python-Dev] RE: [Python-checkins] python/dist/src/Objects typeobject.c, 2.244, 2.245Raymond Hettinger python at rcn.com
Wed Oct 8 22:53:06 EDT 2003
  	if (res == -1 && PyErr_Occurred())
  		return NULL;
! 	return PyInt_FromLong((long)res);
  }
  
--- 3577,3583 ----
  	if (res == -1 && PyErr_Occurred())
  		return NULL;
! 	ret = PyObject_IsTrue(PyInt_FromLong((long)res)) ? Py_True :
Py_False;


The line above leaks and does unnecessary work. I believe it should
read:

  	ret = res ? Py_True : Py_False;


Also, there is another one of these in Objects/descrobject.c line 712.


Raymond Hettinger
                        





More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4