On Sun, Jan 18, 2004 at 12:31:04PM -0800, tim_one at users.sourceforge.net wrote: > Update of /cvsroot/python/python/dist/src/Objects > In directory sc8-pr-cvs1:/tmp/cvs-serv17990 > > Modified Files: > listobject.c > Log Message: > Revert change accidentally checked in as part of a whitespace normalization > patch. > > > Index: listobject.c > =================================================================== > RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v [snip] > *************** > *** 1882,1887 **** > saved_ob_item = self->ob_item; > self->ob_size = 0; > ! /* self->ob_item = empty_ob_item = PyMem_NEW(PyObject *, 0); */ > ! self->ob_item = empty_ob_item = PyMem_NEW(PyObject *, roundupsize(0)); > > if (keyfunc != NULL) { > --- 1879,1883 ---- > saved_ob_item = self->ob_item; > self->ob_size = 0; > ! self->ob_item = empty_ob_item = PyMem_NEW(PyObject *, 0); > > if (keyfunc != NULL) { Is there a particular reason for allocating zero-sized memory for this? On my test, assigning NULL on self->ob_item instead is worked either. Hye-Shik
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