From: "Gonzalo Garramuño" Date: 2007-12-14T19:32:33+09:00 Subject: Re: IRHG - PUSH_FRAME? Charles Thornton wrote: > The following define statement is driving me crazy > I have never seen a #define used this way! > You haven't been coding in C too long. While splitting the do/while between two different macros as done here is not what I would call too good coding, using long macros like these is often needed in C programming (and sometimes C++ too). The do/while construct is an often used to define a block and avoid name collision in temporary variables (and also to allow the macro to be used in if-thens). > Can someone explain what is going on here? > > Does this somehow create a new frame without > allocation, and add it to a ruby_frame linked list? > Yes. PUSH_FRAME and POP_FRAME are to be used together and create a block. PUSH_FRAME(); // some other stuff POP_FRAME(); which expands to: do { ... add frame... // some other stuff ... revert frame ... } while (0); -- Gonzalo Garramu�o ggarra@advancedsl.com.ar AMD4400 - ASUS48N-E GeForce7300GT Xubuntu Gutsy