aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-03-09 18:54:45 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2017-03-09 19:19:25 -0500
commit9cfc4deeb9e6bd8162bd85dce5809d4d7aea2b66 (patch)
treef865360a8b5f6033b374dfb5045d04b34ab831ff /src
parent7666e73a2e9e0e91a9f3b246a4299b44daadcbf8 (diff)
downloadpostgresql-9cfc4deeb9e6bd8162bd85dce5809d4d7aea2b66.tar.gz
postgresql-9cfc4deeb9e6bd8162bd85dce5809d4d7aea2b66.zip
Make CppAsString2() more visible in c.h.
For some reason this standard C string-processing hack was buried in an NLS-related section of c.h. Put it beside CppAsString() so that people are more likely to find it and not be tempted to reinvent local copies, as I nearly did. And provide a more helpful comment, too.
Diffstat (limited to 'src')
-rw-r--r--src/include/c.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/include/c.h b/src/include/c.h
index 947bd980672..bd122f6a56b 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -149,6 +149,8 @@
/*
* CppAsString
* Convert the argument to a string, using the C preprocessor.
+ * CppAsString2
+ * Convert the argument to a string, after one round of macro expansion.
* CppConcat
* Concatenate two arguments together, using the C preprocessor.
*
@@ -157,6 +159,7 @@
* backward compatibility with existing PostgreSQL code.
*/
#define CppAsString(identifier) #identifier
+#define CppAsString2(x) CppAsString(x)
#define CppConcat(x, y) x##y
/*
@@ -1002,10 +1005,6 @@ typedef NameData *Name;
*
* Make sure this matches the installation rules in nls-global.mk.
*/
-
-/* need a second indirection because we want to stringize the macro value, not the name */
-#define CppAsString2(x) CppAsString(x)
-
#ifdef SO_MAJOR_VERSION
#define PG_TEXTDOMAIN(domain) (domain CppAsString2(SO_MAJOR_VERSION) "-" PG_MAJORVERSION)
#else