diff options
author | Michaël Meyer <hierophanie@gmail.com> | 2015-12-09 19:55:48 +0100 |
---|---|---|
committer | Michaël Meyer <hierophanie@gmail.com> | 2015-12-09 19:55:48 +0100 |
commit | 26436c9775e36ec9f608574b87626de139b345ba (patch) | |
tree | ab3a7fbd14a0c7ca5b6d0725423ba27d3118eed2 /utf8proc.h | |
parent | 6b510deff274dc79b4e324abef5fbb45a8162861 (diff) | |
download | libutf8proc-26436c9775e36ec9f608574b87626de139b345ba.tar.gz libutf8proc-26436c9775e36ec9f608574b87626de139b345ba.tar.bz2 |
Reduce the size of the binary.
Use integers instead of pointers in Unicode tables. Saves 226 kb / 716 kb in the
compiled library.
Diffstat (limited to 'utf8proc.h')
-rw-r--r-- | utf8proc.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -132,6 +132,10 @@ extern "C" { #define SSIZE_MAX ((size_t)SIZE_MAX/2) #endif +#ifndef UINT16_MAX +# define UINT16_MAX ~(utf8proc_uint16_t)0 +#endif + /** * Option flags used by several functions in the library. */ @@ -238,8 +242,8 @@ typedef struct utf8proc_property_struct { * @see utf8proc_decomp_type_t. */ utf8proc_propval_t decomp_type; - const utf8proc_int32_t *decomp_mapping; - const utf8proc_int32_t *casefold_mapping; + utf8proc_uint16_t decomp_mapping; + utf8proc_uint16_t casefold_mapping; utf8proc_int32_t uppercase_mapping; utf8proc_int32_t lowercase_mapping; utf8proc_int32_t titlecase_mapping; |