Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13115690
D5845.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D5845.diff
View Options
diff --git a/src/Makefile.am b/src/Makefile.am
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -230,6 +230,7 @@
util/bitmanip.h \
util/bytevectorhash.h \
util/check.h \
+ util/macros.h \
util/moneystr.h \
util/system.h \
util/threadnames.h \
diff --git a/src/sync.h b/src/sync.h
--- a/src/sync.h
+++ b/src/sync.h
@@ -7,6 +7,7 @@
#define BITCOIN_SYNC_H
#include <threadsafety.h>
+#include <util/macros.h>
#include <condition_variable>
#include <mutex>
@@ -173,9 +174,6 @@
using DebugLock = UniqueLock<typename std::remove_reference<
typename std::remove_pointer<MutexArg>::type>::type>;
-#define PASTE(x, y) x##y
-#define PASTE2(x, y) PASTE(x, y)
-
#define LOCK(cs) \
DebugLock<decltype(cs)> PASTE2(criticalblock, \
__COUNTER__)(cs, #cs, __FILE__, __LINE__)
diff --git a/src/util/macros.h b/src/util/macros.h
new file mode 100644
--- /dev/null
+++ b/src/util/macros.h
@@ -0,0 +1,11 @@
+// Copyright (c) 2019 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_UTIL_MACROS_H
+#define BITCOIN_UTIL_MACROS_H
+
+#define PASTE(x, y) x##y
+#define PASTE2(x, y) PASTE(x, y)
+
+#endif // BITCOIN_UTIL_MACROS_H
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 11:44 (3 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187685
Default Alt Text
D5845.diff (1 KB)
Attached To
D5845: refactor: consolidate PASTE macros
Event Timeline
Log In to Comment