]> granicus.if.org Git - python/commit
PyLong_FromSsize_t was incorrect when sizeof(size_t) > sizeof(long);
authorMark Dickinson <dickinsm@gmail.com>
Tue, 15 Apr 2008 21:42:42 +0000 (21:42 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Tue, 15 Apr 2008 21:42:42 +0000 (21:42 +0000)
commit7ab6be216af6fccae655bd5402ae0ad22447f37a
tree22503e2e936f131380051209bb1905c8d9541649
parent32dde22186efbbfcfb275ac9542b3e62a9b5cf1b
PyLong_FromSsize_t was incorrect when sizeof(size_t) > sizeof(long);
rewrite it so that it doesn't care about relative sizes of size_t,
long and long long.

The rewrite is modeled on PyLong_FromLong, instead of using
PyLong_FromByteArray;  this makes the algorithm simpler and
more direct, and possibly also slightly faster.
Misc/NEWS
Objects/longobject.c