Skip to content

Commit 1df44dd

Browse files
committed
b-cs: Define G_TRANSLATION_FUN in bitcoinkernel.cpp
[META] This is done in preparation for extracting libbitcoinkernel in a following commit. It seems logical that generally users of a library shouldn't need to export its own symbols to use the library.
1 parent 83a0bb7 commit 1df44dd

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,7 @@ bitcoin_util_LDADD = \
800800
# bitcoin-chainstate binary #
801801
bitcoin_chainstate_SOURCES = \
802802
bitcoin-chainstate.cpp \
803+
kernel/bitcoinkernel.cpp \
803804
arith_uint256.cpp \
804805
blockfilter.cpp \
805806
chain.cpp \

src/bitcoin-chainstate.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
#include <functional>
2929
#include <iosfwd>
3030

31-
const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;
32-
3331
int main(int argc, char* argv[])
3432
{
3533
// SETUP: Argument parsing and handling

src/kernel/bitcoinkernel.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright (c) 2022 The Bitcoin Core developers
2+
// Distributed under the MIT software license, see the accompanying
3+
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4+
5+
#include <functional>
6+
#include <string>
7+
8+
// Define G_TRANSLATION_FUN symbol in libbitcoinkernel library so users of the
9+
// library aren't required to export this symbol
10+
extern const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;

0 commit comments

Comments
 (0)