diff --git a/hio/lib/hio-utl.h b/hio/lib/hio-utl.h index 0a46f58..262b8b0 100644 --- a/hio/lib/hio-utl.h +++ b/hio/lib/hio-utl.h @@ -1135,14 +1135,14 @@ HIO_EXPORT void hio_sip_hash_24 ( #if defined(__cplusplus) /* -static inline int is_space (char c) { return isspace(c); } -static inline int is_wspace (wchar_t c) { return iswspace(c); } +static inline bool is_space (char c) { return isspace(c); } +static inline bool is_wspace (wchar_t c) { return iswspace(c); } unsigned x = hio_chars_to_uint("0x12345", 7, 0, NULL, NULL); unsigned y = hio_chars_to_uint(L"0x12345", 7, 0, NULL, NULL); int a = hio_chars_to_int("-0x12345", 8, 0, NULL, NULL); int b = hio_chars_to_int(L"-0x12345", 8, 0, NULL, NULL); */ -template +template INT_TYPE hio_chars_to_int (const CHAR_TYPE* str, hio_oow_t len, int option, const CHAR_TYPE** endptr, int* is_sober) { INT_TYPE n = 0; @@ -1258,7 +1258,7 @@ INT_TYPE hio_chars_to_int (const CHAR_TYPE* str, hio_oow_t len, int option, cons return (negative)? -n: n; } -template +template UINT_TYPE hio_chars_to_uint (const CHAR_TYPE* str, hio_oow_t len, int option, const CHAR_TYPE** endptr, int* is_sober) { UINT_TYPE n = 0; diff --git a/hio/lib/hio-utl.h.m4 b/hio/lib/hio-utl.h.m4 index 87de84a..363bc1d 100644 --- a/hio/lib/hio-utl.h.m4 +++ b/hio/lib/hio-utl.h.m4 @@ -1106,15 +1106,15 @@ HIO_EXPORT void hio_sip_hash_24 ( #if defined(__cplusplus) /* -static inline int is_space (char c) { return isspace(c); } -static inline int is_wspace (wchar_t c) { return iswspace(c); } +static inline bool is_space (char c) { return isspace(c); } +static inline bool is_wspace (wchar_t c) { return iswspace(c); } unsigned x = hio_chars_to_uint("0x12345", 7, 0, NULL, NULL); unsigned y = hio_chars_to_uint(L"0x12345", 7, 0, NULL, NULL); int a = hio_chars_to_int("-0x12345", 8, 0, NULL, NULL); int b = hio_chars_to_int(L"-0x12345", 8, 0, NULL, NULL); */ -templatefn_chars_to_int(hio_chars_to_int, CHAR_TYPE, INT_TYPE, IS_SPACE, HIO_CHARS_TO_INT) -templatefn_chars_to_uint(hio_chars_to_uint, CHAR_TYPE, UINT_TYPE, IS_SPACE, HIO_CHARS_TO_UINT) +templatefn_chars_to_int(hio_chars_to_int, CHAR_TYPE, INT_TYPE, IS_SPACE, HIO_CHARS_TO_INT) +templatefn_chars_to_uint(hio_chars_to_uint, CHAR_TYPE, UINT_TYPE, IS_SPACE, HIO_CHARS_TO_UINT) #endif