diff options
Diffstat (limited to 'include/ruby/util.h')
| -rw-r--r-- | include/ruby/util.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/include/ruby/util.h b/include/ruby/util.h index ee11bc940a..b2bc1a09f6 100644 --- a/include/ruby/util.h +++ b/include/ruby/util.h @@ -19,7 +19,7 @@ # include <stddef.h> /* size_t */ #endif -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include <sys/types.h> /* ssize_t */ #endif @@ -36,15 +36,6 @@ RBIMPL_SYMBOL_EXPORT_BEGIN() /** an approximation of ceil(n * log10(2)), up to 65536 at least */ #define DECIMAL_SIZE_OF_BITS(n) (((n) * 3010 + 9998) / 9999) -/** an approximation of decimal representation size for n-bytes */ -#define DECIMAL_SIZE_OF_BYTES(n) DECIMAL_SIZE_OF_BITS((n) * CHAR_BIT) - -/** - * An approximation of decimal representation size. `expr` may be a - * type name - */ -#define DECIMAL_SIZE_OF(expr) DECIMAL_SIZE_OF_BYTES(sizeof(expr)) - /** * Character to number mapping like `'a'` -> `10`, `'b'` -> `11` etc. For * punctuation etc., the value is -1. "36" terminology comes from the fact @@ -133,7 +124,7 @@ unsigned long ruby_scan_hex(const char *str, size_t len, size_t *ret); # define ruby_qsort qsort_r #else void ruby_qsort(void *, const size_t, const size_t, - int (*)(const void *, const void *, void *), void *); + int (*)(const void *, const void *, void *), void *); #endif RBIMPL_ATTR_NONNULL((1)) |
