From: | jian he <jian(dot)universality(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | comment invalid link reference in Macros IF_NEED_REFILL_AND_NOT_EOF_CONTINUE copyfromparse.c |
Date: | 2024-10-21 00:00:00 |
Message-ID: | CACJufxHFXk7F76uR2VufGwmd0r3AgWdPYvmXkuUSKKJBwVGBZg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2024-10-21 00:19:49 | Refactor GetLockStatusData() by skipping unused backends and groups |
Previous Message | Dagfinn Ilmari Mannsåker | 2024-10-20 23:32:08 | Re: type cache cleanup improvements |