summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Goldblatt <davidgoldblatt@fb.com>2017-04-17 22:22:14 (GMT)
committerDavid Goldblatt <davidtgoldblatt@gmail.com>2017-04-19 01:35:03 (GMT)
commit22366518b7309cc7dbe7908818e01a88632bd665 (patch)
treefc11316d2fca0962315c83f86fd191791796a465 /src
parenta01f99307719dcc8ca27cc70f0f0011beff914fa (diff)
downloadjemalloc-22366518b7309cc7dbe7908818e01a88632bd665.zip
jemalloc-22366518b7309cc7dbe7908818e01a88632bd665.tar.gz
jemalloc-22366518b7309cc7dbe7908818e01a88632bd665.tar.bz2
Move CPP_PROLOGUE and CPP_EPILOGUE to the .cpp
This lets us avoid having to specify them in every C file.
Diffstat (limited to 'src')
-rw-r--r--src/jemalloc_cpp.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/jemalloc_cpp.cpp b/src/jemalloc_cpp.cpp
index b6d7c9a..71999a8 100644
--- a/src/jemalloc_cpp.cpp
+++ b/src/jemalloc_cpp.cpp
@@ -2,9 +2,17 @@
#include <new>
#define JEMALLOC_CPP_CPP_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "jemalloc/internal/jemalloc_preamble.h"
#include "jemalloc/internal/jemalloc_internal_includes.h"
+#ifdef __cplusplus
+}
+#endif
+
// All operators in this file are exported.
// Possibly alias hidden versions of malloc and sdallocx to avoid an extra plt