[Python-checkins] r46546 - python/trunk/Objects/dictobject.c
Tim Peters
tim.peters at gmail.com
Tue May 30 07:03:06 CEST 2006
> Author: neal.norwitz
> Date: Tue May 30 06:25:05 2006
> New Revision: 46546
>
> Modified:
> python/trunk/Objects/dictobject.c
> Log:
> Use Py_SAFE_DOWNCAST for safety.
It's not needed here, and this will actually cause debug-build failures:
> - i = (int)Py_ReprEnter((PyObject*)mp);
> + i = Py_SAFE_DOWNCAST(Py_ReprEnter((PyObject*)mp), Py_ssize_t, int);
because the macro evaluates its first argument more than once (and
will increment the repr depth counter as a side effect each time, so
that the function doesn't return the same value each time).
> Fix format strings.
Good catch! Thank you.
> Remove 2 more stray | in comment
Grrrr. My desktop box apparently missed me so much last week that its
keyboard developed this weird stutter. I'm not actually pressing "|"!
The keyboard just spits one out at times, perhaps expressing its
happiness at being used again. It will get over it.
More information about the Python-checkins
mailing list