Lines Matching refs:MBREX
65 #define MBREX(g) (MBSTRG(mb_regex_globals)->g) macro
144 zend_hash_init(&MBREX(ht_rc), 0, NULL, php_mb_regex_free_cache, 0); in PHP_RINIT_FUNCTION()
152 MBREX(current_mbctype) = MBREX(default_mbctype); in PHP_RSHUTDOWN_FUNCTION()
154 if (!Z_ISUNDEF(MBREX(search_str))) { in PHP_RSHUTDOWN_FUNCTION()
155 zval_ptr_dtor(&MBREX(search_str)); in PHP_RSHUTDOWN_FUNCTION()
156 ZVAL_UNDEF(&MBREX(search_str)); in PHP_RSHUTDOWN_FUNCTION()
158 MBREX(search_pos) = 0; in PHP_RSHUTDOWN_FUNCTION()
159 MBREX(search_re) = NULL; in PHP_RSHUTDOWN_FUNCTION()
161 if (MBREX(search_regs) != NULL) { in PHP_RSHUTDOWN_FUNCTION()
162 onig_region_free(MBREX(search_regs), 1); in PHP_RSHUTDOWN_FUNCTION()
163 MBREX(search_regs) = (OnigRegion *)NULL; in PHP_RSHUTDOWN_FUNCTION()
165 zend_hash_destroy(&MBREX(ht_rc)); in PHP_RSHUTDOWN_FUNCTION()
419 MBREX(current_mbctype) = mbctype; in php_mb_regex_set_mbctype()
431 MBREX(default_mbctype) = mbctype; in php_mb_regex_set_default_mbctype()
439 return _php_mb_regex_mbctype2name(MBREX(current_mbctype)); in php_mb_regex_get_mbctype()
446 return _php_mb_regex_mbctype2name(MBREX(default_mbctype)); in php_mb_regex_get_default_mbctype()
467 rc = zend_hash_str_find_ptr(&MBREX(ht_rc), (char *)pattern, patlen); in php_mbregex_compile_pattern()
474 if (rc == MBREX(search_re)) { in php_mbregex_compile_pattern()
476 MBREX(search_re) = NULL; in php_mbregex_compile_pattern()
478 zend_hash_str_update_ptr(&MBREX(ht_rc), (char *)pattern, patlen, retval); in php_mbregex_compile_pattern()
849 const char *retval = _php_mb_regex_mbctype2name(MBREX(current_mbctype)); in PHP_FUNCTION()
864 MBREX(current_mbctype) = mbctype; in PHP_FUNCTION()
916 _php_mb_regex_mbctype2name(MBREX(current_mbctype)) in _php_mb_regex_ereg_exec()
921 options = MBREX(regex_default_options); in _php_mb_regex_ereg_exec()
944 …rn(Z_STRVAL_P(arg_pattern), Z_STRLEN_P(arg_pattern), options, MBREX(current_mbctype), MBREX(regex_… in _php_mb_regex_ereg_exec()
1039 current_enc_name = _php_mb_regex_mbctype2name(MBREX(current_mbctype)); in _php_mb_regex_ereg_replace_exec()
1072 _php_mb_regex_mbctype2name(MBREX(current_mbctype)) in _php_mb_regex_ereg_replace_exec()
1080 options |= MBREX(regex_default_options); in _php_mb_regex_ereg_replace_exec()
1081 syntax = MBREX(regex_default_syntax); in _php_mb_regex_ereg_replace_exec()
1108 …re = php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, options, MBREX(current_mbctype), sy… in _php_mb_regex_ereg_replace_exec()
1298 _php_mb_regex_mbctype2name(MBREX(current_mbctype)))) { in PHP_FUNCTION()
1303 …_compile_pattern(arg_pattern, arg_pattern_len, MBREX(regex_default_options), MBREX(current_mbctype… in PHP_FUNCTION()
1387 option |= MBREX(regex_default_options); in PHP_FUNCTION()
1388 syntax = MBREX(regex_default_syntax); in PHP_FUNCTION()
1393 _php_mb_regex_mbctype2name(MBREX(current_mbctype)))) { in PHP_FUNCTION()
1397 …if ((re = php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, option, MBREX(current_mbctype)… in PHP_FUNCTION()
1440 option |= MBREX(regex_default_options); in _php_mb_regex_ereg_search_exec()
1441 syntax = MBREX(regex_default_syntax); in _php_mb_regex_ereg_search_exec()
1444 if (MBREX(search_regs)) { in _php_mb_regex_ereg_search_exec()
1445 onig_region_free(MBREX(search_regs), 1); in _php_mb_regex_ereg_search_exec()
1446 MBREX(search_regs) = NULL; in _php_mb_regex_ereg_search_exec()
1451 …if ((MBREX(search_re) = php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, option, MBREX(cu… in _php_mb_regex_ereg_search_exec()
1456 pos = MBREX(search_pos); in _php_mb_regex_ereg_search_exec()
1459 if (!Z_ISUNDEF(MBREX(search_str)) && Z_TYPE(MBREX(search_str)) == IS_STRING){ in _php_mb_regex_ereg_search_exec()
1460 str = (OnigUChar *)Z_STRVAL(MBREX(search_str)); in _php_mb_regex_ereg_search_exec()
1461 len = Z_STRLEN(MBREX(search_str)); in _php_mb_regex_ereg_search_exec()
1464 if (MBREX(search_re) == NULL) { in _php_mb_regex_ereg_search_exec()
1474 MBREX(search_regs) = onig_region_new(); in _php_mb_regex_ereg_search_exec()
1476 …err = _php_mb_onig_search(MBREX(search_re), str, str + len, str + pos, str + len, MBREX(search_re… in _php_mb_regex_ereg_search_exec()
1478 MBREX(search_pos) = len; in _php_mb_regex_ereg_search_exec()
1489 beg = MBREX(search_regs)->beg[0]; in _php_mb_regex_ereg_search_exec()
1490 end = MBREX(search_regs)->end[0]; in _php_mb_regex_ereg_search_exec()
1496 n = MBREX(search_regs)->num_regs; in _php_mb_regex_ereg_search_exec()
1498 beg = MBREX(search_regs)->beg[i]; in _php_mb_regex_ereg_search_exec()
1499 end = MBREX(search_regs)->end[i]; in _php_mb_regex_ereg_search_exec()
1506 if (onig_number_of_names(MBREX(search_re)) > 0) { in _php_mb_regex_ereg_search_exec()
1509 Z_STRVAL(MBREX(search_str)), in _php_mb_regex_ereg_search_exec()
1510 Z_STRLEN(MBREX(search_str)), in _php_mb_regex_ereg_search_exec()
1511 MBREX(search_regs) in _php_mb_regex_ereg_search_exec()
1513 onig_foreach_name(MBREX(search_re), mb_regex_groups_iter, &args); in _php_mb_regex_ereg_search_exec()
1520 end = MBREX(search_regs)->end[0]; in _php_mb_regex_ereg_search_exec()
1522 MBREX(search_pos) = end; in _php_mb_regex_ereg_search_exec()
1524 MBREX(search_pos) = pos + 1; in _php_mb_regex_ereg_search_exec()
1529 onig_region_free(MBREX(search_regs), 1); in _php_mb_regex_ereg_search_exec()
1530 MBREX(search_regs) = (OnigRegion *)NULL; in _php_mb_regex_ereg_search_exec()
1579 option = MBREX(regex_default_options); in PHP_FUNCTION()
1580 syntax = MBREX(regex_default_syntax); in PHP_FUNCTION()
1589 …if ((MBREX(search_re) = php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, option, MBREX(cu… in PHP_FUNCTION()
1594 if (!Z_ISNULL(MBREX(search_str))) { in PHP_FUNCTION()
1595 zval_ptr_dtor(&MBREX(search_str)); in PHP_FUNCTION()
1598 ZVAL_STR_COPY(&MBREX(search_str), arg_str); in PHP_FUNCTION()
1603 _php_mb_regex_mbctype2name(MBREX(current_mbctype)) in PHP_FUNCTION()
1605 MBREX(search_pos) = 0; in PHP_FUNCTION()
1608 MBREX(search_pos) = ZSTR_LEN(arg_str); in PHP_FUNCTION()
1612 if (MBREX(search_regs) != NULL) { in PHP_FUNCTION()
1613 onig_region_free(MBREX(search_regs), 1); in PHP_FUNCTION()
1614 MBREX(search_regs) = NULL; in PHP_FUNCTION()
1626 if (MBREX(search_regs) != NULL && Z_TYPE(MBREX(search_str)) == IS_STRING) { in PHP_FUNCTION()
1629 str = (OnigUChar *)Z_STRVAL(MBREX(search_str)); in PHP_FUNCTION()
1630 len = Z_STRLEN(MBREX(search_str)); in PHP_FUNCTION()
1631 n = MBREX(search_regs)->num_regs; in PHP_FUNCTION()
1633 beg = MBREX(search_regs)->beg[i]; in PHP_FUNCTION()
1634 end = MBREX(search_regs)->end[i]; in PHP_FUNCTION()
1641 if (onig_number_of_names(MBREX(search_re)) > 0) { in PHP_FUNCTION()
1644 Z_STRVAL(MBREX(search_str)), in PHP_FUNCTION()
1646 MBREX(search_regs) in PHP_FUNCTION()
1648 onig_foreach_name(MBREX(search_re), mb_regex_groups_iter, &args); in PHP_FUNCTION()
1660 RETVAL_LONG(MBREX(search_pos)); in PHP_FUNCTION()
1675 …if ((position < 0) && (!Z_ISUNDEF(MBREX(search_str))) && (Z_TYPE(MBREX(search_str)) == IS_STRING))… in PHP_FUNCTION()
1676 position += Z_STRLEN(MBREX(search_str)); in PHP_FUNCTION()
1679 …position < 0 || (!Z_ISUNDEF(MBREX(search_str)) && Z_TYPE(MBREX(search_str)) == IS_STRING && (size_… in PHP_FUNCTION()
1681 MBREX(search_pos) = 0; in PHP_FUNCTION()
1685 MBREX(search_pos) = position; in PHP_FUNCTION()
1694 *prev_options = MBREX(regex_default_options); in _php_mb_regex_set_options()
1697 *prev_syntax = MBREX(regex_default_syntax); in _php_mb_regex_set_options()
1699 MBREX(regex_default_options) = options; in _php_mb_regex_set_options()
1700 MBREX(regex_default_syntax) = syntax; in _php_mb_regex_set_options()
1724 opt = MBREX(regex_default_options); in PHP_FUNCTION()
1725 syntax = MBREX(regex_default_syntax); in PHP_FUNCTION()