Message100122
Right, I already agreed it would be fine to fix this if it's cheap ;-)
I didn't give any real thought to the macro solution, but that's fine by me too. It would be best to embed the assignment in a _natural_ place, though; like, say:
#define Py_ADDRESS_IN_RANGE(P, POOL) \
((POOL)->arenaindex < maxarenas && \
(uptr)(P) - (x = arenas[(POOL)->arenaindex].address) < (uptr)ARENA_SIZE && \
x != 0)
where some better name than `x` is picked, and the trick is clearly documented at x's declaration point. Nothing wrong with expediency here! This is time-critical code and has always been skating on the edge. |
|
Date |
User |
Action |
Args |
2010-02-25 22:59:27 | tim.peters | set | recipients:
+ tim.peters, amaury.forgeotdarc, pitrou, mbandy |
2010-02-25 22:59:27 | tim.peters | set | messageid: <1267138767.73.0.796035792694.issue8020@psf.upfronthosting.co.za> |
2010-02-25 22:59:26 | tim.peters | link | issue8020 messages |
2010-02-25 22:59:26 | tim.peters | create | |
|