Tim Peters <[email protected]> added the comment:
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.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue8020>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com