Fix inline-related macro issues.

Add JEMALLOC_INLINE_C and use it instead of JEMALLOC_INLINE in .c files,
so that the annotated functions are always static.

Remove SFMT's inline-related macros and use jemalloc's instead, so that
there's no danger of interactions with jemalloc's definitions that
disable inlining for debug builds.
This commit is contained in:
Jason Evans 2013-12-10 14:23:10 -08:00
parent 7369232544
commit 6edc97db15
6 changed files with 43 additions and 65 deletions

View file

@ -66,22 +66,6 @@
#ifndef SFMT_H
#define SFMT_H
#if defined(__GNUC__)
#define ALWAYSINLINE __attribute__((always_inline))
#else
#define ALWAYSINLINE
#endif
#if defined(_MSC_VER)
#if _MSC_VER >= 1200
#define PRE_ALWAYS __forceinline
#else
#define PRE_ALWAYS inline
#endif
#else
#define PRE_ALWAYS inline
#endif
typedef struct sfmt_s sfmt_t;
uint32_t gen_rand32(sfmt_t *ctx);