[Python-Dev] longobject.c & ob_size
Michael Hudson
mwh at python.net
Wed Apr 6 15:57:24 CEST 2005
Michael Hudson <mwh at python.net> writes:
> Tim Peters <tim.peters at gmail.com> writes:
>
>> [Michael Hudson]
>>> Asking mostly for curiousity, how hard would it be to have longs store
>>> their sign bit somewhere less aggravating?
>>
>> Depends on where that is.
[...]
>> I'd much rather give struct _longobject a distinct sign member (say, 0
>> == zero, -1 = non-zero negative, 1 == non-zero positive).
I ended up doing -1 non-zero negative, 1 zero and positive, but I
don't know if this is really clearer than what you suggest overall. I
suspect it's a wash.
[...]
> I might do a patch, at some point...
http://python.org/sf/1177779
Assigned to you, but unassign if you don't have time (testing the
patch is probably more worthwhile than reading it!).
Cheers,
mwh
--
Linux: Horse. Like a wild horse, fun to ride. Also prone to
throwing you and stamping you into the ground because it doesn't
like your socks. -- Jim's pedigree of operating systems, asr
More information about the Python-Dev
mailing list