Move CPP_PROLOGUE and CPP_EPILOGUE to the .cpp

This lets us avoid having to specify them in every C file.
This commit is contained in:
David Goldblatt 2017-04-17 15:22:14 -07:00 committed by David Goldblatt
parent a01f993077
commit 22366518b7
5 changed files with 8 additions and 21 deletions

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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);

View File

@ -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