summaryrefslogtreecommitdiff
path: root/utf8proc.h
diff options
context:
space:
mode:
authorMichaël Meyer <hierophanie@gmail.com>2015-12-09 19:55:48 +0100
committerMichaël Meyer <hierophanie@gmail.com>2015-12-09 19:55:48 +0100
commit26436c9775e36ec9f608574b87626de139b345ba (patch)
treeab3a7fbd14a0c7ca5b6d0725423ba27d3118eed2 /utf8proc.h
parent6b510deff274dc79b4e324abef5fbb45a8162861 (diff)
downloadlibutf8proc-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.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/utf8proc.h b/utf8proc.h
index 32887e7..a8d53fc 100644
--- a/utf8proc.h
+++ b/utf8proc.h
@@ -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;