[Python-Dev] RE: [Python-checkins] CVS: python/dist/src/Objects object.c,2.109,2.110
Tim Peters
tim.one@home.com
Sat, 20 Jan 2001 01:17:04 -0500
[Barry]
> Modified Files:
> object.c
> Log Message:
> default_3way_compare(): When comparing the 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. This quiets an Insure
> portability warning.
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