Message84234
> I think PyLong_SIGN and PyLong_EQUALS_ZERO should go in
> Include/longobject.h, not Include/longintrepr.h
Yeah, it's better for 3rd party modules.
> PyLong_NDIGITS should stay in longintrepr.h, though,
> since it's dependent on the representation.
I don't understand why. PyLong_SIGN() and PyLong_EQUALS_ZERO() do also
depend on the PyLong implementation. Eg. if we choose to store zero in
a PyLong of 1 digit (digits={0}), PyLong_SIGN() have also to be
changed. I think that PyLong_SIGN() can also be moved to longobject.h
(not done in my patch v3).
> Perhaps rename PyLong_EQUALS_ZERO to PyLong_IS_ZERO?
Done.
> Almost all your uses of PyLong_SIGN take the form
> PyLong_SIGN(X) < 0. Maybe it would be better to have a
> PyLong_IS_NEGATIVE macro instead?
Not "almost all", just "all" :-) So I also changed the macro name. |
|
Date |
User |
Action |
Args |
2009-03-26 23:58:00 | vstinner | set | recipients:
+ vstinner, gregory.p.smith, mark.dickinson, pernici, christian.heimes |
2009-03-26 23:57:59 | vstinner | set | messageid: <1238111879.24.0.444942566073.issue4294@psf.upfronthosting.co.za> |
2009-03-26 23:57:57 | vstinner | link | issue4294 messages |
2009-03-26 23:57:57 | vstinner | create | |
|