Skip to content

Commit 12f5028

Browse files
committed
refactor: Move STRINGIZE macro to macros.h
This is a move-only change.
1 parent d0d2565 commit 12f5028

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/clientversion.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#ifndef BITCOIN_CLIENTVERSION_H
66
#define BITCOIN_CLIENTVERSION_H
77

8+
#include <util/macros.h>
9+
810
#if defined(HAVE_CONFIG_H)
911
#include <config/bitcoin-config.h>
1012
#endif //HAVE_CONFIG_H
@@ -14,13 +16,6 @@
1416
#error Client version information missing: version is not defined by bitcoin-config.h or in any other way
1517
#endif
1618

17-
/**
18-
* Converts the parameter X to a string after macro replacement on X has been performed.
19-
* Don't merge these into one macro!
20-
*/
21-
#define STRINGIZE(X) DO_STRINGIZE(X)
22-
#define DO_STRINGIZE(X) #X
23-
2419
//! Copyright string used in Windows .rc files
2520
#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " " COPYRIGHT_HOLDERS_FINAL
2621

src/util/macros.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,11 @@
88
#define PASTE(x, y) x ## y
99
#define PASTE2(x, y) PASTE(x, y)
1010

11+
/**
12+
* Converts the parameter X to a string after macro replacement on X has been performed.
13+
* Don't merge these into one macro!
14+
*/
15+
#define STRINGIZE(X) DO_STRINGIZE(X)
16+
#define DO_STRINGIZE(X) #X
17+
1118
#endif // BITCOIN_UTIL_MACROS_H

0 commit comments

Comments
 (0)