From: Anatol Belski Date: Thu, 12 Mar 2015 12:42:36 +0000 (+0100) Subject: upgrade to oniguruman 5.9.6 X-Git-Tag: PRE_PHP7_NSAPI_REMOVAL~687 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e30c543ec8e6c371e0aef6e125e7b90f4b1b790;p=php upgrade to oniguruman 5.9.6 --- diff --git a/ext/mbstring/oniguruma/HISTORY b/ext/mbstring/oniguruma/HISTORY index 969deec36b..9ee0a3fe00 100644 --- a/ext/mbstring/oniguruma/HISTORY +++ b/ext/mbstring/oniguruma/HISTORY @@ -1,5 +1,10 @@ History +2014/12/12: Version 5.9.6 + +2013/11/27: [impl] add onigenc_end_unicode(). (thanks Takenori Imoto) +2013/11/27: [impl] add onig_add_end_call(). (thanks Takenori Imoto) + 2013/10/21: Version 5.9.5 2013/10/21: [impl] escape warnings for -Wall. (regparse.c) @@ -897,7 +902,7 @@ History 2004/10/18: [impl] (thanks Imai Yasumasa) enclose #include by #ifndef __BORLANDC__. 2004/10/18: [bug] (thanks Imai Yasumasa) - memory access violation in select_opt_exact_info(). + memory acess violation in select_opt_exact_info(). 2004/09/25: [dist] fix doc/API and doc/API.ja. 2004/09/25: [bug] fix OP_SEMI_END_BUF process in match_at() for the case USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE @@ -1831,7 +1836,7 @@ History 2003/01/31: [impl] rename TTRANS() to TOLOWER(). 2003/01/30: [bug] .c.o --> .c.obj in win32\Makefile. 2003/01/30: [impl] add -DNOT_RUBY to Makefile.in. - NOT_RUBY is referred in regint.h for escape double + NOT_RUBY is refered in regint.h for escape double including config.h. 2003/01/30: [impl] when string hasn't case ambiguity, don't compile to ignore case opcode. diff --git a/ext/mbstring/oniguruma/enc/big5.c b/ext/mbstring/oniguruma/enc/big5.c index 82a9e92c8d..ca1e01b463 100644 --- a/ext/mbstring/oniguruma/enc/big5.c +++ b/ext/mbstring/oniguruma/enc/big5.c @@ -126,7 +126,7 @@ big5_left_adjust_char_head(const UChar* start, const UChar* s) p++; break; } - } + } } len = enclen(ONIG_ENCODING_BIG5, p); if (p + len > s) return (UChar* )p; diff --git a/ext/mbstring/oniguruma/enc/euc_jp.c b/ext/mbstring/oniguruma/enc/euc_jp.c index ed906a50e5..f605297cc3 100644 --- a/ext/mbstring/oniguruma/enc/euc_jp.c +++ b/ext/mbstring/oniguruma/enc/euc_jp.c @@ -115,7 +115,7 @@ code_to_mbc(OnigCodePoint code, UChar *buf) #if 1 if (enclen(ONIG_ENCODING_EUC_JP, buf) != (p - buf)) return ONIGERR_INVALID_CODE_POINT_VALUE; -#endif +#endif return p - buf; } diff --git a/ext/mbstring/oniguruma/enc/sjis.c b/ext/mbstring/oniguruma/enc/sjis.c index 902a869e76..7a54c9fb3a 100644 --- a/ext/mbstring/oniguruma/enc/sjis.c +++ b/ext/mbstring/oniguruma/enc/sjis.c @@ -155,7 +155,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end) { return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_SJIS, flag, pp, end); - + } #endif @@ -190,7 +190,7 @@ left_adjust_char_head(const UChar* start, const UChar* s) p++; break; } - } + } } len = enclen(ONIG_ENCODING_SJIS, p); if (p + len > s) return (UChar* )p; diff --git a/ext/mbstring/oniguruma/enc/unicode.c b/ext/mbstring/oniguruma/enc/unicode.c index 2b7225eed4..e13429f51e 100644 --- a/ext/mbstring/oniguruma/enc/unicode.c +++ b/ext/mbstring/oniguruma/enc/unicode.c @@ -2,7 +2,7 @@ unicode.c - Oniguruma (regular expression library) **********************************************************************/ /*- - * Copyright (c) 2002-2008 K.Kosako + * Copyright (c) 2002-2013 K.Kosako * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10891,6 +10891,21 @@ static st_table* Unfold2Table; static st_table* Unfold3Table; static int CaseFoldInited = 0; + +extern void onigenc_end_unicode(void) +{ + THREAD_ATOMIC_START; + + if (FoldTable != 0) st_free_table(FoldTable); + if (Unfold1Table != 0) st_free_table(Unfold1Table); + if (Unfold2Table != 0) st_free_table(Unfold2Table); + if (Unfold3Table != 0) st_free_table(Unfold3Table); + + CaseFoldInited = 0; + + THREAD_ATOMIC_END; +} + static int init_case_fold_table(void) { const CaseFold_11_Type *p; @@ -10952,6 +10967,9 @@ static int init_case_fold_table(void) st_add_direct(Unfold3Table, (st_data_t )p3->from, (st_data_t )(&p3->to)); } + + onig_add_end_call(onigenc_end_unicode); + CaseFoldInited = 1; THREAD_ATOMIC_END; return 0; @@ -10986,7 +11004,7 @@ onigenc_unicode_mbc_case_fold(OnigEncoding enc, if (onig_st_lookup(FoldTable, (st_data_t )code, (void* )&to) != 0) { if (to->n == 1) { - return ONIGENC_CODE_TO_MBC(enc, to->code[0], fold); + return ONIGENC_CODE_TO_MBC(enc, to->code[0], fold); } #if 0 /* NO NEEDS TO CHECK */ @@ -11094,7 +11112,7 @@ onigenc_unicode_apply_all_case_fold(OnigCaseFoldType flag, for (j = 0; j < CaseUnfold_12[i].to.n; j++) { r = (*f)(CaseUnfold_12[i].to.code[j], (OnigCodePoint* )CaseUnfold_12[i].from, 2, arg); - if (r != 0) return r; + if (r != 0) return r; for (k = 0; k < CaseUnfold_12[i].to.n; k++) { if (k == j) continue; @@ -11115,7 +11133,7 @@ onigenc_unicode_apply_all_case_fold(OnigCaseFoldType flag, for (j = 0; j < CaseUnfold_12_Locale[i].to.n; j++) { r = (*f)(CaseUnfold_12_Locale[i].to.code[j], (OnigCodePoint* )CaseUnfold_12_Locale[i].from, 2, arg); - if (r != 0) return r; + if (r != 0) return r; for (k = 0; k < CaseUnfold_12_Locale[i].to.n; k++) { if (k == j) continue; @@ -11136,7 +11154,7 @@ onigenc_unicode_apply_all_case_fold(OnigCaseFoldType flag, for (j = 0; j < CaseUnfold_13[i].to.n; j++) { r = (*f)(CaseUnfold_13[i].to.code[j], (OnigCodePoint* )CaseUnfold_13[i].from, 3, arg); - if (r != 0) return r; + if (r != 0) return r; for (k = 0; k < CaseUnfold_13[i].to.n; k++) { if (k == j) continue; diff --git a/ext/mbstring/oniguruma/index.html b/ext/mbstring/oniguruma/index.html index 9231942b16..c5bb382cd1 100755 --- a/ext/mbstring/oniguruma/index.html +++ b/ext/mbstring/oniguruma/index.html @@ -8,7 +8,7 @@

Oniguruma

(Japanese)

-(c) K.Kosako, updated at: 2013/10/21 +(c) K.Kosako, updated at: 2014/12/12

@@ -16,7 +16,7 @@
What's new
    -
  • 2013/10/21: Version 5.9.5 released.
  • +
  • 2014/12/12: Version 5.9.6 released.
  • 2007/08/16: Version 4.7.1 released.
  • 2007/06/20: Version 2.5.9 released.
  • 2007/06/20: Maintainer of 2.x was changed.
  • @@ -62,8 +62,8 @@ ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
    Download:
      -
    • Latest release version 5.9.5 (2013/10/21) Change Log -
    • 5.9.4 (2013/04/04) +
    • Latest release version 5.9.6 (2014/12/12) Change Log +
    • 5.9.5 (2013/10/21)
    • Latest release version 4.7.1 (2007/08/16) Change Log
    • 4.7.0 (2007/06/18)
    • Latest release version 2.5.9 (2007/06/20) Change Log @@ -78,7 +78,7 @@ About 2.x, please contact him.
      * 2.x supports Ruby1.6/1.8.

      -
      Documents: (version 5.9.5) +
      Documents: (version 5.9.6)
      • Regular Expressions (Japanese: EUC-JP) diff --git a/ext/mbstring/oniguruma/index_ja.html b/ext/mbstring/oniguruma/index_ja.html index 4826cbc2e2..c5d98fb4bf 100644 --- a/ext/mbstring/oniguruma/index_ja.html +++ b/ext/mbstring/oniguruma/index_ja.html @@ -8,7 +8,7 @@

        鬼車

        -(c) K.Kosako, 最終更新: 2013/04/04 +(c) K.Kosako, 最終更新: 2014/12/12

        @@ -16,7 +16,7 @@
        更新情報
          -
        • 2013/10/21: Version 5.9.5 リリース
        • +
        • 2014/12/12: Version 5.9.6 リリース
        • 2007/08/16: Version 4.7.1 リリース
        • 2007/06/20: Version 2.5.9 リリース
        • 2007/06/20: 2.xの保守担当者を変更
        • @@ -62,8 +62,8 @@ ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
          ダウンロード:
            -
          • 5.9.5 最新版 (2013/10/21) 更新履歴 -
          • 5.9.4 (2013/04/04) +
          • 5.9.6 最新版 (2014/12/12) 更新履歴 +
          • 5.9.5 (2013/10/21)
          • 4.7.1 最新版 (2007/08/16) 更新履歴
          • 4.7.0 (2007/06/18)
          • 2.5.9 最新版 (2007/06/20) 更新履歴 @@ -78,7 +78,7 @@ ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
            * 2.xはRuby1.6/1.8組込みライブラリとして動作する。 (2006年末で保守を終了)

            -
            ドキュメント: (version 5.9.5) +
            ドキュメント: (version 5.9.6)
            • 正規表現 (日本語: EUC-JP) diff --git a/ext/mbstring/oniguruma/oniguruma.h b/ext/mbstring/oniguruma/oniguruma.h index 70c9d506d3..adf4efc08b 100644 --- a/ext/mbstring/oniguruma/oniguruma.h +++ b/ext/mbstring/oniguruma/oniguruma.h @@ -36,7 +36,7 @@ extern "C" { #define ONIGURUMA #define ONIGURUMA_VERSION_MAJOR 5 #define ONIGURUMA_VERSION_MINOR 9 -#define ONIGURUMA_VERSION_TEENY 5 +#define ONIGURUMA_VERSION_TEENY 6 #ifdef __cplusplus # ifndef HAVE_PROTOTYPES @@ -144,7 +144,7 @@ typedef struct { OnigCodePoint one_or_more_time; OnigCodePoint anychar_anytime; } OnigMetaCharTableType; - + typedef int (*OnigApplyAllCaseFoldFunc)(OnigCodePoint from, OnigCodePoint* to, int to_len, void* arg); typedef struct OnigEncodingTypeST { @@ -536,7 +536,7 @@ ONIG_EXTERN OnigSyntaxType* OnigDefaultSyntax; #define ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED -21 #define ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR -22 /* general error */ -#define ONIGERR_INVALID_ARGUMENT -30 +#define ONIGERR_INVALID_ARGUMENT -30 /* syntax error */ #define ONIGERR_END_PATTERN_AT_LEFT_BRACE -100 #define ONIGERR_END_PATTERN_AT_LEFT_BRACKET -101 diff --git a/ext/mbstring/oniguruma/regcomp.c b/ext/mbstring/oniguruma/regcomp.c index 3df27f7690..b93ca948a7 100644 --- a/ext/mbstring/oniguruma/regcomp.c +++ b/ext/mbstring/oniguruma/regcomp.c @@ -2,7 +2,7 @@ regcomp.c - Oniguruma (regular expression library) **********************************************************************/ /*- - * Copyright (c) 2002-2008 K.Kosako + * Copyright (c) 2002-2013 K.Kosako * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -2555,7 +2555,7 @@ is_not_included(Node* x, Node* y, regex_t* reg) } } break; - + default: break; } @@ -3293,7 +3293,7 @@ expand_case_fold_string_alt(int item_num, OnigCaseFoldCodeItem items[], for (i = 0; i < item_num; i++) { snode = onig_node_new_str(NULL, NULL); if (IS_NULL(snode)) goto mem_err; - + for (j = 0; j < items[i].code_len; j++) { len = ONIGENC_CODE_TO_MBC(reg->enc, items[i].code[j], buf); if (len < 0) { @@ -4003,15 +4003,15 @@ distance_value(MinMaxLen* mm) { /* 1000 / (min-max-dist + 1) */ static const short int dist_vals[] = { - 1000, 500, 333, 250, 200, 167, 143, 125, 111, 100, - 91, 83, 77, 71, 67, 63, 59, 56, 53, 50, - 48, 45, 43, 42, 40, 38, 37, 36, 34, 33, - 32, 31, 30, 29, 29, 28, 27, 26, 26, 25, - 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, - 20, 19, 19, 19, 18, 18, 18, 17, 17, 17, - 16, 16, 16, 16, 15, 15, 15, 15, 14, 14, - 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, - 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, + 1000, 500, 333, 250, 200, 167, 143, 125, 111, 100, + 91, 83, 77, 71, 67, 63, 59, 56, 53, 50, + 48, 45, 43, 42, 40, 38, 37, 36, 34, 33, + 32, 31, 30, 29, 29, 28, 27, 26, 26, 25, + 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, + 20, 19, 19, 19, 18, 18, 18, 17, 17, 17, + 16, 16, 16, 16, 15, 15, 15, 15, 14, 14, + 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, + 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10 }; @@ -4898,7 +4898,7 @@ set_optimize_exact_info(regex_t* reg, OptExactInfo* e) reg->exact = str_dup(e->s, e->s + e->len); CHECK_NULL_RETURN_MEMERR(reg->exact); reg->exact_end = reg->exact + e->len; - + allow_reverse = ONIGENC_IS_ALLOWED_REVERSE_MATCH(reg->enc, reg->exact, reg->exact_end); @@ -5575,11 +5575,44 @@ onig_init(void) } +static OnigEndCallListItemType* EndCallTop; + +extern void onig_add_end_call(void (*func)(void)) +{ + OnigEndCallListItemType* item; + + item = (OnigEndCallListItemType* )xmalloc(sizeof(*item)); + if (item == 0) return ; + + item->next = EndCallTop; + item->func = func; + + EndCallTop = item; +} + +static void +exec_end_call_list(void) +{ + OnigEndCallListItemType* prev; + void (*func)(void); + + while (EndCallTop != 0) { + func = EndCallTop->func; + (*func)(); + + prev = EndCallTop; + EndCallTop = EndCallTop->next; + xfree(prev); + } +} + extern int onig_end(void) { THREAD_ATOMIC_START; + exec_end_call_list(); + #ifdef ONIG_DEBUG_STATISTICS onig_print_statistics(stderr); #endif @@ -5880,7 +5913,7 @@ onig_print_compiled_byte_code(FILE* f, UChar* bp, UChar** nextp, p_len_string(f, len, 1, bp); bp += len; break; - + case OP_EXACTMB2N1: p_string(f, 2, bp); bp += 2; break; case OP_EXACTMB2N2: @@ -5900,7 +5933,7 @@ onig_print_compiled_byte_code(FILE* f, UChar* bp, UChar** nextp, case OP_EXACTMBN: { int mb_len; - + GET_LENGTH_INC(mb_len, bp); GET_LENGTH_INC(len, bp); fprintf(f, ":%d:%d:", mb_len, len); diff --git a/ext/mbstring/oniguruma/regenc.c b/ext/mbstring/oniguruma/regenc.c index 85f9eda110..80903508b8 100644 --- a/ext/mbstring/oniguruma/regenc.c +++ b/ext/mbstring/oniguruma/regenc.c @@ -112,7 +112,7 @@ onigenc_strlen(OnigEncoding enc, const UChar* p, const UChar* end) { int n = 0; UChar* q = (UChar* )p; - + while (q < end) { q += ONIGENC_MBC_ENC_LEN(enc, q); n++; @@ -125,7 +125,7 @@ onigenc_strlen_null(OnigEncoding enc, const UChar* s) { int n = 0; UChar* p = (UChar* )s; - + while (1) { if (*p == '\0') { UChar* q; diff --git a/ext/mbstring/oniguruma/regenc.h b/ext/mbstring/oniguruma/regenc.h index da2e1aa05b..40963280dc 100644 --- a/ext/mbstring/oniguruma/regenc.h +++ b/ext/mbstring/oniguruma/regenc.h @@ -184,6 +184,6 @@ ONIG_EXTERN const unsigned short OnigEncAsciiCtypeTable[]; #define ONIGENC_IS_ASCII_CODE_CASE_AMBIG(code) \ (ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_UPPER) ||\ ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_LOWER)) - + #endif /* REGENC_H */ diff --git a/ext/mbstring/oniguruma/regerror.c b/ext/mbstring/oniguruma/regerror.c index 1cedbbcac3..385e560d98 100644 --- a/ext/mbstring/oniguruma/regerror.c +++ b/ext/mbstring/oniguruma/regerror.c @@ -251,7 +251,7 @@ onig_error_code_to_str(UChar* s, int code, ...) onig_error_code_to_str(s, code, va_alist) UChar* s; int code; - va_dcl + va_dcl #endif { UChar *p, *q; diff --git a/ext/mbstring/oniguruma/regexec.c b/ext/mbstring/oniguruma/regexec.c index 936db02430..7430d78514 100644 --- a/ext/mbstring/oniguruma/regexec.c +++ b/ext/mbstring/oniguruma/regexec.c @@ -202,13 +202,13 @@ static int onig_region_resize_clear(OnigRegion* region, int n) { int r; - + r = onig_region_resize(region, n); if (r != 0) return r; onig_region_clear(region); return 0; } - + extern int onig_region_set(OnigRegion* region, int at, int beg, int end) { @@ -218,7 +218,7 @@ onig_region_set(OnigRegion* region, int at, int beg, int end) int r = onig_region_resize(region, at + 1); if (r < 0) return r; } - + region->beg[at] = beg; region->end[at] = end; return 0; @@ -2141,7 +2141,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, int len; UChar *pstart, *pend; - /* if you want to remove following line, + /* if you want to remove following line, you should check in parse and compile time. */ if (mem > num_mem) goto fail; if (mem_end_stk[mem] == INVALID_STACK_INDEX) goto fail; @@ -2173,7 +2173,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, int len; UChar *pstart, *pend; - /* if you want to remove following line, + /* if you want to remove following line, you should check in parse and compile time. */ if (mem > num_mem) goto fail; if (mem_end_stk[mem] == INVALID_STACK_INDEX) goto fail; @@ -2302,7 +2302,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, MOP_OUT; continue; } - + break; #endif @@ -2968,7 +2968,7 @@ bm_search(regex_t* reg, const UChar* target, const UChar* target_end, static int set_bm_backward_skip(UChar* s, UChar* end, OnigEncoding enc ARG_UNUSED, int** skip) - + { int i, len; diff --git a/ext/mbstring/oniguruma/regint.h b/ext/mbstring/oniguruma/regint.h index fa16a44790..0fba09bb58 100644 --- a/ext/mbstring/oniguruma/regint.h +++ b/ext/mbstring/oniguruma/regint.h @@ -4,7 +4,7 @@ regint.h - Oniguruma (regular expression library) **********************************************************************/ /*- - * Copyright (c) 2002-2008 K.Kosako + * Copyright (c) 2002-2013 K.Kosako * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -50,7 +50,6 @@ #if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \ (defined(__ppc__) && defined(__APPLE__)) || \ defined(__x86_64) || defined(__x86_64__) || \ - defined(__powerpc64__) || \ defined(__mc68020__) #define PLATFORM_UNALIGNED_WORD_ACCESS #endif @@ -751,6 +750,14 @@ typedef struct { #define IS_CODE_SB_WORD(enc,code) \ (ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_WORD(enc,code)) +typedef struct OnigEndCallListItem { + struct OnigEndCallListItem* next; + void (*func)(void); +} OnigEndCallListItemType; + +extern void onig_add_end_call(void (*func)(void)); + + #ifdef ONIG_DEBUG typedef struct { @@ -761,6 +768,7 @@ typedef struct { extern OnigOpInfoType OnigOpInfo[]; + extern void onig_print_compiled_byte_code P_((FILE* f, UChar* bp, UChar** nextp, OnigEncoding enc)); #ifdef ONIG_DEBUG_STATISTICS diff --git a/ext/mbstring/oniguruma/regparse.c b/ext/mbstring/oniguruma/regparse.c index feba986118..bf72300caa 100644 --- a/ext/mbstring/oniguruma/regparse.c +++ b/ext/mbstring/oniguruma/regparse.c @@ -51,7 +51,7 @@ OnigSyntaxType OnigSyntaxRuby = { ONIG_SYN_OP2_CCLASS_SET_OP | ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL | ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META | ONIG_SYN_OP2_ESC_V_VTAB | ONIG_SYN_OP2_ESC_H_XDIGIT ) - , ( SYN_GNU_REGEX_BV | + , ( SYN_GNU_REGEX_BV | ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV | ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND | ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP | @@ -2845,7 +2845,7 @@ find_str_position(OnigCodePoint s[], int n, UChar* from, UChar* to, OnigCodePoint x; UChar *q; UChar *p = from; - + while (p < to) { x = ONIGENC_MBC_TO_CODE(enc, p, to); q = p + enclen(enc, p); @@ -3406,7 +3406,7 @@ fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env) goto skip_backref; } - if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_DECIMAL_BACKREF) && + if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_DECIMAL_BACKREF) && (num <= env->num_mem || num <= 9)) { /* This spec. from GNU regex */ if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) { if (num > env->num_mem || IS_NULL(SCANENV_MEM_NODES(env)[num])) @@ -4384,7 +4384,7 @@ parse_char_class(Node** np, OnigToken* tok, UChar** src, UChar* end, CC_ESC_WARN(env, (UChar* )"-"); goto range_end_val; } - + if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC)) { CC_ESC_WARN(env, (UChar* )"-"); goto sb_char; /* [0-9-a] is allowed as [0-9\-a] */ @@ -5067,7 +5067,7 @@ parse_exp(Node** np, OnigToken* tok, int term, r = parse_subexp(&target, tok, term, src, end, env); env->option = prev; if (r < 0) return r; - NENCLOSE(*np)->target = target; + NENCLOSE(*np)->target = target; return tok->type; } break; @@ -5235,7 +5235,7 @@ parse_exp(Node** np, OnigToken* tok, int term, xmemcpy(new_key, &key, sizeof(type_cclass_key)); onig_st_add_direct(OnigTypeCClassTable, (st_data_t )new_key, (st_data_t )*np); - + THREAD_ATOMIC_END; } else { diff --git a/ext/mbstring/oniguruma/regparse.h b/ext/mbstring/oniguruma/regparse.h index af47461e56..0c5c2c936c 100644 --- a/ext/mbstring/oniguruma/regparse.h +++ b/ext/mbstring/oniguruma/regparse.h @@ -192,7 +192,7 @@ typedef struct { AbsAddrType call_addr; /* for multiple call reference */ OnigDistance min_len; /* min length (byte) */ - OnigDistance max_len; /* max length (byte) */ + OnigDistance max_len; /* max length (byte) */ int char_len; /* character length */ int opt_count; /* referenced count in optimize_node_left() */ } EncloseNode; diff --git a/ext/mbstring/oniguruma/regsyntax.c b/ext/mbstring/oniguruma/regsyntax.c index 1099fc8e16..ade5b55f77 100644 --- a/ext/mbstring/oniguruma/regsyntax.c +++ b/ext/mbstring/oniguruma/regsyntax.c @@ -67,8 +67,8 @@ OnigSyntaxType OnigSyntaxPosixExtended = { ONIG_SYN_OP_BRACE_INTERVAL | ONIG_SYN_OP_PLUS_ONE_INF | ONIG_SYN_OP_QMARK_ZERO_ONE | ONIG_SYN_OP_VBAR_ALT ) , 0 - , ( ONIG_SYN_CONTEXT_INDEP_ANCHORS | - ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS | ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS | + , ( ONIG_SYN_CONTEXT_INDEP_ANCHORS | + ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS | ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS | ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP | ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC ) , ( ONIG_OPTION_SINGLELINE | ONIG_OPTION_MULTILINE )