1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-18 17:42:25 +03:00

In GCC-based builds, use a better newNode() macro that relies on GCC-specific

syntax to avoid a useless store into a global variable.  Per experimentation,
this works better than my original thought of trying to push the code into
an out-of-line subroutine.
This commit is contained in:
Tom Lane
2008-08-29 22:49:07 +00:00
parent 7ad60b49dc
commit 6253f9de67
2 changed files with 25 additions and 2 deletions

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/nodes/nodes.c,v 1.28 2008/01/01 19:45:50 momjian Exp $
* $PostgreSQL: pgsql/src/backend/nodes/nodes.c,v 1.29 2008/08/29 22:49:07 tgl Exp $
*
* HISTORY
* Andrew Yu Oct 20, 1994 file creation
@ -22,6 +22,10 @@
/*
* Support for newNode() macro
*
* In a GCC build there is no need for the global variable newNodeMacroHolder.
* However, we create it anyway, to support the case of a non-GCC-built
* loadable module being loaded into a GCC-built backend.
*/
Node *newNodeMacroHolder;