summaryrefslogtreecommitdiff
path: root/src/unicode.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-07-23 10:18:42 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-07-23 10:18:42 +0200
commit3583c157ab4535e5ccee87e787be33447213461f (patch)
tree88b4ca33e0b887948715dcba6556c35daaec9cdd /src/unicode.c
parent7aac082e4e72a80c965825bbc5e8176bc7667e5a (diff)
parent995dfd20e78ad16cec678df25422ce032650e3aa (diff)
Updated version 6.4.0 from 'upstream/6.4.0'
with Debian dir c94f3039d51e97ec5152e0857aee3095c04a8323
Diffstat (limited to 'src/unicode.c')
-rw-r--r--src/unicode.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/unicode.c b/src/unicode.c
index 8812ca2..5b6b3e7 100644
--- a/src/unicode.c
+++ b/src/unicode.c
@@ -2,7 +2,7 @@
unicode.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2016 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2017 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -91,6 +91,7 @@ extern int
onig_unicode_define_user_property(const char* name, OnigCodePoint* ranges)
{
UserDefinedPropertyValue* e;
+ int r;
int i;
int n;
int len;
@@ -130,9 +131,10 @@ onig_unicode_define_user_property(const char* name, OnigCodePoint* ranges)
e = UserDefinedPropertyRanges + UserDefinedPropertyNum;
e->ctype = CODE_RANGES_NUM + UserDefinedPropertyNum;
e->ranges = ranges;
- onig_st_insert_strend(UserDefinedPropertyTable,
- (const UChar* )s, (const UChar* )s + n,
- (hash_data_type )((void* )e));
+ r = onig_st_insert_strend(UserDefinedPropertyTable,
+ (const UChar* )s, (const UChar* )s + n,
+ (hash_data_type )((void* )e));
+ if (r < 0) return r;
UserDefinedPropertyNum++;
return 0;
@@ -162,7 +164,7 @@ onigenc_unicode_is_code_ctype(OnigCodePoint code, unsigned int ctype)
extern int
-onigenc_unicode_ctype_code_range(int ctype, const OnigCodePoint* ranges[])
+onigenc_unicode_ctype_code_range(OnigCtype ctype, const OnigCodePoint* ranges[])
{
if (ctype >= CODE_RANGES_NUM) {
int index = ctype - CODE_RANGES_NUM;