[Python-Dev] Re: [Python-checkins] python/dist/src/Objects
listobject.c, 2.176, 2.177
Hye-Shik Chang
perky at i18n.org
Sun Jan 18 15:48:38 EST 2004
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
More information about the Python-Dev
mailing list