Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9cfc4de

Browse files
committed
Make CppAsString2() more visible in c.h.
For some reason this standard C string-processing hack was buried in anNLS-related section of c.h. Put it beside CppAsString() so that peopleare more likely to find it and not be tempted to reinvent local copies,as I nearly did. And provide a more helpful comment, too.
1 parent7666e73 commit9cfc4de

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

‎src/include/c.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@
149149
/*
150150
* CppAsString
151151
*Convert the argument to a string, using the C preprocessor.
152+
* CppAsString2
153+
*Convert the argument to a string, after one round of macro expansion.
152154
* CppConcat
153155
*Concatenate two arguments together, using the C preprocessor.
154156
*
@@ -157,6 +159,7 @@
157159
* backward compatibility with existing PostgreSQL code.
158160
*/
159161
#defineCppAsString(identifier) #identifier
162+
#defineCppAsString2(x)CppAsString(x)
160163
#defineCppConcat(x,y)x##y
161164

162165
/*
@@ -1002,10 +1005,6 @@ typedef NameData *Name;
10021005
*
10031006
* Make sure this matches the installation rules in nls-global.mk.
10041007
*/
1005-
1006-
/* need a second indirection because we want to stringize the macro value, not the name */
1007-
#defineCppAsString2(x) CppAsString(x)
1008-
10091008
#ifdefSO_MAJOR_VERSION
10101009
#definePG_TEXTDOMAIN(domain) (domain CppAsString2(SO_MAJOR_VERSION) "-" PG_MAJORVERSION)
10111010
#else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp