Gregory Stark <[EMAIL PROTECTED]> writes:
> "Tom Lane" <[EMAIL PROTECTED]> writes:
>> Plus you can't do it without multiple evaluation of the macro argument,

> I don't see any way to do VARSIZE without multiply evaluating its argument.

Some variant of

        #define VARSIZE(x)      (ntohl((x)->vl_len) & 0x3fffffff)
        #define VARSIZE(x)      ((x)->vl_len >> 2)

The 1-or-4-byte version is a lot harder, but also will be used in a lot
fewer places, all of which will get looked at when it gets installed.
I'm prepared to put up with multiple eval for that.  I *don't* want to
assume that existing code can tolerate multiple eval in a macro that has
existed forever and never did it before.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to