]> granicus.if.org Git - python/commit
Some minor cleanups in PyLong_FromLong:
authorMark Dickinson <dickinsm@gmail.com>
Sat, 24 Jan 2009 15:02:35 +0000 (15:02 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sat, 24 Jan 2009 15:02:35 +0000 (15:02 +0000)
commitd4624c3331a54506b9c678ad096e56366b66f51d
treeb503cc038d47e1f1fbb565f0987d74a970bcf42b
parent59e4779abc25626cb0ab9fa24ccb3223a00db143
Some minor cleanups in PyLong_FromLong:
 - fast path wasn't being properly taken for negative ints;
   thanks Victor Stinner for pointing this out.
 - use Py_SAFE_DOWNCAST instead of direct casting to digit
   (it's safer, especially if we ever consider moving to 30-bit
   digits)
 - cleaner way to write negation
Objects/longobject.c