[Python-checkins] CVS: python/dist/src/Objects object.c,2.110,2.111
Barry Warsaw
bwarsaw@users.sourceforge.net
Fri, 19 Jan 2001 22:24:58 -0800
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv20976
Modified Files:
object.c
Log Message:
Tim chastens:
Barry, that comment belongs in the code, not in the checkin msg.
The code *used* to do this correctly (as you well know, since you
& I went thru considerable pain to fix this the first time).
However, because the *reason* for the convolution wasn't recorded
in the code as a comment, somebody threw it all away the first
time it got reworked.
c-code-isn't-often-self-explanatory-ly y'rs - tim
default_3way_compare(): Stick the checkin message from 2.110 in a
comment.
Index: object.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/object.c,v
retrieving revision 2.110
retrieving revision 2.111
diff -C2 -r2.110 -r2.111
*** object.c 2001/01/20 06:08:10 2.110
--- object.c 2001/01/20 06:24:55 2.111
***************
*** 525,529 ****
if (v->ob_type == w->ob_type) {
! /* same type: compare pointers */
Py_uintptr_t vv = (Py_uintptr_t)v;
Py_uintptr_t ww = (Py_uintptr_t)w;
--- 525,533 ----
if (v->ob_type == w->ob_type) {
! /* When comparing these pointers, they must be cast to
! * integer types (i.e. Py_uintptr_t, our spelling of C9X's
! * uintptr_t). ANSI specifies that pointer compares other
! * than == and != to non-related structures are undefined.
! */
Py_uintptr_t vv = (Py_uintptr_t)v;
Py_uintptr_t ww = (Py_uintptr_t)w;