diff options
-rw-r--r-- | include/jemalloc/internal/atomic.h | 4 | ||||
-rw-r--r-- | include/jemalloc/internal/jemalloc_internal_includes.h | 4 | ||||
-rw-r--r-- | include/jemalloc/internal/jemalloc_preamble.h.in | 12 | ||||
-rw-r--r-- | include/jemalloc/internal/malloc_io.h | 1 | ||||
-rw-r--r-- | src/jemalloc_cpp.cpp | 8 |
5 files changed, 8 insertions, 21 deletions
diff --git a/include/jemalloc/internal/atomic.h b/include/jemalloc/internal/atomic.h index 1bfae7d..adadb1a 100644 --- a/include/jemalloc/internal/atomic.h +++ b/include/jemalloc/internal/atomic.h @@ -3,8 +3,6 @@ #define ATOMIC_INLINE static inline -CPP_PROLOGUE - #if defined(JEMALLOC_GCC_ATOMIC_ATOMICS) # include "jemalloc/internal/atomic_gcc_atomic.h" #elif defined(JEMALLOC_GCC_SYNC_ATOMICS) @@ -76,6 +74,4 @@ JEMALLOC_GENERATE_INT_ATOMICS(uint64_t, u64, 3) #undef ATOMIC_INLINE -CPP_EPILOGUE - #endif /* JEMALLOC_INTERNAL_ATOMIC_H */ diff --git a/include/jemalloc/internal/jemalloc_internal_includes.h b/include/jemalloc/internal/jemalloc_internal_includes.h index 53374f9..6871883 100644 --- a/include/jemalloc/internal/jemalloc_internal_includes.h +++ b/include/jemalloc/internal/jemalloc_internal_includes.h @@ -36,8 +36,6 @@ * global jemalloc definitions, however. */ -CPP_PROLOGUE - /******************************************************************************/ /* HERMETIC HEADERS */ /******************************************************************************/ @@ -149,6 +147,4 @@ CPP_PROLOGUE #include "jemalloc/internal/jemalloc_internal_inlines_c.h" #include "jemalloc/internal/prof_inlines_b.h" -CPP_EPILOGUE - #endif /* JEMALLOC_INTERNAL_INCLUDES_H */ diff --git a/include/jemalloc/internal/jemalloc_preamble.h.in b/include/jemalloc/internal/jemalloc_preamble.h.in index 6e38fe6..7c796c6 100644 --- a/include/jemalloc/internal/jemalloc_preamble.h.in +++ b/include/jemalloc/internal/jemalloc_preamble.h.in @@ -1,16 +1,6 @@ #ifndef JEMALLOC_PREAMBLE_H #define JEMALLOC_PREAMBLE_H -#ifdef __cplusplus -# define CPP_PROLOGUE extern "C" { -# define CPP_EPILOGUE } -#else -# define CPP_PROLOGUE -# define CPP_EPILOGUE -#endif - -CPP_PROLOGUE - #include "jemalloc_internal_defs.h" #include "jemalloc/internal/jemalloc_internal_decls.h" @@ -182,6 +172,4 @@ static const bool have_percpu_arena = #endif ; -CPP_EPILOGUE - #endif /* JEMALLOC_PREAMBLE_H */ diff --git a/include/jemalloc/internal/malloc_io.h b/include/jemalloc/internal/malloc_io.h index 8b2fb96..47ae58e 100644 --- a/include/jemalloc/internal/malloc_io.h +++ b/include/jemalloc/internal/malloc_io.h @@ -40,7 +40,6 @@ */ #define MALLOC_PRINTF_BUFSIZE 4096 - int buferror(int err, char *buf, size_t buflen); uintmax_t malloc_strtoumax(const char *restrict nptr, char **restrict endptr, int base); 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 |