summaryrefslogtreecommitdiff
path: root/src/unicode_fold3_key.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-06-02 19:35:34 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-06-02 19:35:34 +0200
commit9c10d3a428f2e33d01e1ea66932d272ac731787f (patch)
tree9f0bd8ce746633353241ddad69d3fa9f187e656a /src/unicode_fold3_key.c
parentf42b61800a1a1b360c5ac915ec1caf34bf1fb86b (diff)
New upstream version 6.3.0upstream/6.3.0
Diffstat (limited to 'src/unicode_fold3_key.c')
-rw-r--r--src/unicode_fold3_key.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/unicode_fold3_key.c b/src/unicode_fold3_key.c
index 8095b1c..1b4d9d4 100644
--- a/src/unicode_fold3_key.c
+++ b/src/unicode_fold3_key.c
@@ -1,7 +1,7 @@
/* This file was converted by gperf_fold_key_conv.py
from gperf output file. */
-/* ANSI-C code produced by gperf version 3.0.3 */
-/* Command-line: /Library/Developer/CommandLineTools/usr/bin/gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N unicode_fold3_key unicode_fold3_key.gperf */
+/* ANSI-C code produced by gperf version 3.0.4 */
+/* Command-line: gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N unicode_fold3_key unicode_fold3_key.gperf */
/* Computed positions: -k'3,6,9' */
@@ -60,6 +60,12 @@ hash(OnigCodePoint codes[])
return asso_values[(unsigned char)onig_codes_byte_at(codes, 8)] + asso_values[(unsigned char)onig_codes_byte_at(codes, 5)] + asso_values[(unsigned char)onig_codes_byte_at(codes, 2)];
}
+#ifdef __GNUC__
+__inline
+#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
+__attribute__ ((__gnu_inline__))
+#endif
+#endif
int
unicode_fold3_key(OnigCodePoint codes[])
{
@@ -99,7 +105,7 @@ unicode_fold3_key(OnigCodePoint codes[])
{
int key = hash(codes);
- if (key <= MAX_HASH_VALUE)
+ if (key <= MAX_HASH_VALUE && key >= 0)
{
int index = wordlist[key];