]> granicus.if.org Git - onig/commitdiff
update unicode_property_data.c by gperf 3.0.4
authorK.Kosako <kosako@sofnec.co.jp>
Wed, 16 Aug 2017 06:45:56 +0000 (15:45 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Wed, 16 Aug 2017 06:45:56 +0000 (15:45 +0900)
src/unicode_property_data.c
src/unicode_property_data_posix.c

index 4ca438fea6d6ac62f1593b91b5cfec40ba837029..23672726f74a3f64d276beac78c74e12136e7d09 100644 (file)
@@ -1,5 +1,5 @@
-/* ANSI-C code produced by gperf version 3.0.3 */
-/* Command-line: /Library/Developer/CommandLineTools/usr/bin/gperf -T -C -c -t -j1 -L ANSI-C --ignore-case -N unicode_lookup_property_name --output-file gperf.tmp unicode_property_data.gperf  */
+/* ANSI-C code produced by gperf version 3.0.4 */
+/* Command-line: gperf -T -C -c -t -j1 -L ANSI-C --ignore-case -N unicode_lookup_property_name --output-file gperf.tmp unicode_property_data.gperf  */
 /* Computed positions: -k'1-3,5-6,12,16,$' */
 
 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
@@ -23000,7 +23000,7 @@ hash (register const char *str, register unsigned int len)
       5163, 5163, 5163, 5163, 5163, 5163, 5163, 5163, 5163, 5163,
       5163, 5163, 5163, 5163, 5163, 5163
     };
-  register unsigned int hval = len;
+  register int hval = len;
 
   switch (hval)
     {
@@ -23038,6 +23038,12 @@ hash (register const char *str, register unsigned int len)
   return hval + asso_values[(unsigned char)str[len - 1]];
 }
 
+#ifdef __GNUC__
+__inline
+#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
+__attribute__ ((__gnu_inline__))
+#endif
+#endif
 const struct PropertyNameCtype *
 unicode_lookup_property_name (register const char *str, register unsigned int len)
 {
@@ -25285,9 +25291,9 @@ unicode_lookup_property_name (register const char *str, register unsigned int le
 
   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
     {
-      unsigned int key = hash (str, len);
+      register int key = hash (str, len);
 
-      if (key <= MAX_HASH_VALUE)
+      if (key <= MAX_HASH_VALUE && key >= 0)
         {
           register const char *s = wordlist[key].name;
 
index 83aabc60be51dbb7ce01e4cea66bb6b924fd74a1..1cf082b50aba073204e9ba6d7d2156bd2773c35c 100644 (file)
@@ -1,5 +1,5 @@
-/* ANSI-C code produced by gperf version 3.0.3 */
-/* Command-line: /Library/Developer/CommandLineTools/usr/bin/gperf -T -C -c -t -j1 -L ANSI-C --ignore-case -N unicode_lookup_property_name --output-file gperf.tmp unicode_property_data_posix.gperf  */
+/* ANSI-C code produced by gperf version 3.0.4 */
+/* Command-line: gperf -T -C -c -t -j1 -L ANSI-C --ignore-case -N unicode_lookup_property_name --output-file gperf.tmp unicode_property_data_posix.gperf  */
 /* Computed positions: -k'1,3' */
 
 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
@@ -4879,6 +4879,12 @@ hash (register const char *str, register unsigned int len)
   return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]];
 }
 
+#ifdef __GNUC__
+__inline
+#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
+__attribute__ ((__gnu_inline__))
+#endif
+#endif
 const struct PropertyNameCtype *
 unicode_lookup_property_name (register const char *str, register unsigned int len)
 {
@@ -4919,9 +4925,9 @@ unicode_lookup_property_name (register const char *str, register unsigned int le
 
   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
     {
-      unsigned int key = hash (str, len);
+      register int key = hash (str, len);
 
-      if (key <= MAX_HASH_VALUE)
+      if (key <= MAX_HASH_VALUE && key >= 0)
         {
           register const char *s = wordlist[key].name;