[Python-Dev] Memory size overflows

Tim Peters tim.one@comcast.net
Wed, 16 Oct 2002 12:37:54 -0400


[Guido]
> The trick will to ensure that the macro arguments are used exactly
> once in all versions (otherwise switching macros might unveal a new
> class of> > bugs).

[Armin Rigo]
> Harder...

It's trivial if you define the macro to take an lvalue result argument.
Then the macro can expand to a block, and so declare block-local temp
variables, including, if desired, temps that are merely initialized to other
macro arguments.  Such temps can be reused as often as you like without
semantic consquence.  Contorting this into expression rvalue form is a
challenge, but a worthier challenge is yielding to common sense here <wink>.