Header refactoring: Add CPP_PROLOGUE and CPP_EPILOGUE macros

This commit is contained in:
David Goldblatt 2017-04-10 18:25:27 -07:00 committed by David Goldblatt
parent bfa530b75b
commit 57e36e1a12

View File

@ -2,9 +2,15 @@
#define JEMALLOC_INTERNAL_H #define JEMALLOC_INTERNAL_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { # define CPP_PROLOGUE extern "C" {
# define CPP_EPILOGUE }
#else
# define CPP_PROLOGUE
# define CPP_EPILOGUE
#endif #endif
CPP_PROLOGUE
#include "jemalloc_internal_defs.h" #include "jemalloc_internal_defs.h"
#include "jemalloc/internal/jemalloc_internal_decls.h" #include "jemalloc/internal/jemalloc_internal_decls.h"
@ -1300,8 +1306,6 @@ ixalloc(tsdn_t *tsdn, void *ptr, size_t oldsize, size_t size, size_t extra,
#include "jemalloc/internal/prof_inlines_b.h" #include "jemalloc/internal/prof_inlines_b.h"
#ifdef __cplusplus CPP_EPILOGUE
}
#endif
#endif /* JEMALLOC_INTERNAL_H */ #endif /* JEMALLOC_INTERNAL_H */