[issue4294] Macros for PyLong: sign, number of digits, fits in an int

STINNER Victor report at bugs.python.org
Wed Mar 18 23:44:41 CET 2009


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Updated version of my macros patch for PyLong type:
 - patch for Python trunk
 - define 3 macros: PyLong_SIGN(x), PyLong_EQUALS_ZERO(x), 
PyLong_NDIGITS(x)
 - just replace code by the equivalent macros

The goal is the make the code easier to read. It would also help if we 
change the PyLong implementation (eg. the 2^30 base patch).

My previous patch was for py3k, the new one is for Python trunk and is 
shorter. I only kept the most simple macros.

----------
Added file: http://bugs.python.org/file13369/pylong_macros-2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4294>
_______________________________________


More information about the Python-bugs-list mailing list