comment invalid link reference in Macros IF_NEED_REFILL_AND_NOT_EOF_CONTINUE copyfromparse.c - Mailing list pgsql-hackers

From jian he
Subject comment invalid link reference in Macros IF_NEED_REFILL_AND_NOT_EOF_CONTINUE copyfromparse.c
Date
Msg-id CACJufxHFXk7F76uR2VufGwmd0r3AgWdPYvmXkuUSKKJBwVGBZg@mail.gmail.com
Whole thread Raw
List pgsql-hackers
hi.
click through
src/backend/commands/copyfromparse.c
comments link.

/*
 * These macros centralize code used to process line_buf and input_buf buffers.
 * They are macros because they often do continue/break control and to avoid
 * function call overhead in tight COPY loops.
 *
 * We must use "if (1)" because the usual "do {...} while(0)" wrapper would
 * prevent the continue/break processing from working.  We end the "if (1)"
 * with "else ((void) 0)" to ensure the "if" does not unintentionally match
 * any "else" in the calling code, and to avoid any compiler warnings about
 * empty statements.  See http://www.cit.gu.edu.au/~anthony/info/C/C.macros.
 */
found the link is invalid.

The valid link should be
https://antofthy.gitlab.io/info/C/C_macros.txt
?


https://antofthy.gitlab.io/info/C/C_macros.txt
says:

    General solutions to the brace-block problem.
       #define   macro(x)   do { statements; } while (0)   /* prefered */
       #define   macro(x)   if (1) { statements; } else



pgsql-hackers by date:

Previous
From: Dagfinn Ilmari Mannsåker
Date:
Subject: Re: type cache cleanup improvements
Next
From: vignesh C
Date:
Subject: Re: Pgoutput not capturing the generated columns