diff options
| author | Jason Evans <jasone@canonware.com> | 2014-01-22 19:11:22 (GMT) |
|---|---|---|
| committer | Jason Evans <jasone@canonware.com> | 2014-01-22 19:11:22 (GMT) |
| commit | cc47dde16203a6ae7eb685b53e1ae501f3869bc6 (patch) | |
| tree | 74e81d65651b2ca7e294a857797dda6635177454 /include/jemalloc/internal/util.h | |
| parent | 0135fb806e4137dc9cdf152541926a2bc95e33f0 (diff) | |
| parent | 798a48103014aabf8afb3d7efff90399a466dd8c (diff) | |
| download | jemalloc-3.5.0.zip jemalloc-3.5.0.tar.gz jemalloc-3.5.0.tar.bz2 | |
Merge branch 'dev'3.5.0
Diffstat (limited to 'include/jemalloc/internal/util.h')
| -rw-r--r-- | include/jemalloc/internal/util.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/include/jemalloc/internal/util.h b/include/jemalloc/internal/util.h index 8479693..6b938f7 100644 --- a/include/jemalloc/internal/util.h +++ b/include/jemalloc/internal/util.h @@ -14,7 +14,7 @@ * Wrap a cpp argument that contains commas such that it isn't broken up into * multiple arguments. */ -#define JEMALLOC_CONCAT(...) __VA_ARGS__ +#define JEMALLOC_ARG_CONCAT(...) __VA_ARGS__ /* * Silence compiler warnings due to uninitialized values. This is used @@ -42,12 +42,6 @@ } while (0) #endif -/* Use to assert a particular configuration, e.g., cassert(config_debug). */ -#define cassert(c) do { \ - if ((c) == false) \ - assert(false); \ -} while (0) - #ifndef not_reached #define not_reached() do { \ if (config_debug) { \ @@ -69,10 +63,18 @@ } while (0) #endif +#ifndef assert_not_implemented #define assert_not_implemented(e) do { \ if (config_debug && !(e)) \ not_implemented(); \ } while (0) +#endif + +/* Use to assert a particular configuration, e.g., cassert(config_debug). */ +#define cassert(c) do { \ + if ((c) == false) \ + not_reached(); \ +} while (0) #endif /* JEMALLOC_H_TYPES */ /******************************************************************************/ @@ -82,8 +84,9 @@ /******************************************************************************/ #ifdef JEMALLOC_H_EXTERNS -int buferror(char *buf, size_t buflen); -uintmax_t malloc_strtoumax(const char *nptr, char **endptr, int base); +int buferror(int err, char *buf, size_t buflen); +uintmax_t malloc_strtoumax(const char *restrict nptr, + char **restrict endptr, int base); void malloc_write(const char *s); /* @@ -107,7 +110,6 @@ void malloc_printf(const char *format, ...) #ifndef JEMALLOC_ENABLE_INLINE size_t pow2_ceil(size_t x); -void malloc_write(const char *s); void set_errno(int errnum); int get_errno(void); #endif |
