Lines Matching refs:MBREX

65 #define MBREX(g) (MBSTRG(mb_regex_globals)->g)  macro
136 zend_hash_init(&MBREX(ht_rc), 0, NULL, php_mb_regex_free_cache, 0); in PHP_RINIT_FUNCTION()
144 MBREX(current_mbctype) = MBREX(default_mbctype); in PHP_RSHUTDOWN_FUNCTION()
145 MBREX(current_mbctype_mbfl_encoding) = mbfl_name2encoding(php_mb_regex_get_default_mbctype()); in PHP_RSHUTDOWN_FUNCTION()
147 if (!Z_ISUNDEF(MBREX(search_str))) { in PHP_RSHUTDOWN_FUNCTION()
148 zval_ptr_dtor(&MBREX(search_str)); in PHP_RSHUTDOWN_FUNCTION()
149 ZVAL_UNDEF(&MBREX(search_str)); in PHP_RSHUTDOWN_FUNCTION()
151 MBREX(search_pos) = 0; in PHP_RSHUTDOWN_FUNCTION()
152 MBREX(search_re) = NULL; in PHP_RSHUTDOWN_FUNCTION()
154 if (MBREX(search_regs) != NULL) { in PHP_RSHUTDOWN_FUNCTION()
155 onig_region_free(MBREX(search_regs), 1); in PHP_RSHUTDOWN_FUNCTION()
156 MBREX(search_regs) = (OnigRegion *)NULL; in PHP_RSHUTDOWN_FUNCTION()
158 zend_hash_destroy(&MBREX(ht_rc)); in PHP_RSHUTDOWN_FUNCTION()
412 MBREX(current_mbctype) = mbctype; in php_mb_regex_set_mbctype()
413 MBREX(current_mbctype_mbfl_encoding) = mbfl_name2encoding(encname); in php_mb_regex_set_mbctype()
425 MBREX(default_mbctype) = mbctype; in php_mb_regex_set_default_mbctype()
433 return _php_mb_regex_mbctype2name(MBREX(current_mbctype)); in php_mb_regex_get_mbctype()
440 return MBREX(current_mbctype_mbfl_encoding); in php_mb_regex_get_mbctype_encoding()
447 return _php_mb_regex_mbctype2name(MBREX(default_mbctype)); in php_mb_regex_get_default_mbctype()
461 OnigEncoding enc = MBREX(current_mbctype); in php_mbregex_compile_pattern()
469 rc = zend_hash_str_find_ptr(&MBREX(ht_rc), (char *)pattern, patlen); in php_mbregex_compile_pattern()
476 if (rc == MBREX(search_re)) { in php_mbregex_compile_pattern()
478 MBREX(search_re) = NULL; in php_mbregex_compile_pattern()
480 zend_hash_str_update_ptr(&MBREX(ht_rc), (char *)pattern, patlen, retval); in php_mbregex_compile_pattern()
922 options = MBREX(regex_default_options); in _php_mb_regex_ereg_exec()
927 …re = php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, options, MBREX(regex_default_syntax… in _php_mb_regex_ereg_exec()
1042 options |= MBREX(regex_default_options); in _php_mb_regex_ereg_replace_exec()
1043 syntax = MBREX(regex_default_syntax); in _php_mb_regex_ereg_replace_exec()
1202 … php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, MBREX(regex_default_options), MBREX(reg… in PHP_FUNCTION()
1288 option |= MBREX(regex_default_options); in PHP_FUNCTION()
1289 syntax = MBREX(regex_default_syntax); in PHP_FUNCTION()
1341 option |= MBREX(regex_default_options); in _php_mb_regex_ereg_search_exec()
1342 syntax = MBREX(regex_default_syntax); in _php_mb_regex_ereg_search_exec()
1345 if (MBREX(search_regs)) { in _php_mb_regex_ereg_search_exec()
1346 onig_region_free(MBREX(search_regs), 1); in _php_mb_regex_ereg_search_exec()
1347 MBREX(search_regs) = NULL; in _php_mb_regex_ereg_search_exec()
1352 …if ((MBREX(search_re) = php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, option, syntax))… in _php_mb_regex_ereg_search_exec()
1357 pos = MBREX(search_pos); in _php_mb_regex_ereg_search_exec()
1360 if (!Z_ISUNDEF(MBREX(search_str)) && Z_TYPE(MBREX(search_str)) == IS_STRING){ in _php_mb_regex_ereg_search_exec()
1361 str = (OnigUChar *)Z_STRVAL(MBREX(search_str)); in _php_mb_regex_ereg_search_exec()
1362 len = Z_STRLEN(MBREX(search_str)); in _php_mb_regex_ereg_search_exec()
1365 if (MBREX(search_re) == NULL) { in _php_mb_regex_ereg_search_exec()
1375 MBREX(search_regs) = onig_region_new(); in _php_mb_regex_ereg_search_exec()
1377 …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()
1379 MBREX(search_pos) = len; in _php_mb_regex_ereg_search_exec()
1390 beg = MBREX(search_regs)->beg[0]; in _php_mb_regex_ereg_search_exec()
1391 end = MBREX(search_regs)->end[0]; in _php_mb_regex_ereg_search_exec()
1397 n = MBREX(search_regs)->num_regs; in _php_mb_regex_ereg_search_exec()
1399 beg = MBREX(search_regs)->beg[i]; in _php_mb_regex_ereg_search_exec()
1400 end = MBREX(search_regs)->end[i]; in _php_mb_regex_ereg_search_exec()
1407 if (onig_number_of_names(MBREX(search_re)) > 0) { in _php_mb_regex_ereg_search_exec()
1410 Z_STRVAL(MBREX(search_str)), in _php_mb_regex_ereg_search_exec()
1411 Z_STRLEN(MBREX(search_str)), in _php_mb_regex_ereg_search_exec()
1412 MBREX(search_regs) in _php_mb_regex_ereg_search_exec()
1414 onig_foreach_name(MBREX(search_re), mb_regex_groups_iter, &args); in _php_mb_regex_ereg_search_exec()
1421 end = MBREX(search_regs)->end[0]; in _php_mb_regex_ereg_search_exec()
1423 MBREX(search_pos) = end; in _php_mb_regex_ereg_search_exec()
1425 MBREX(search_pos) = pos + 1; in _php_mb_regex_ereg_search_exec()
1430 onig_region_free(MBREX(search_regs), 1); in _php_mb_regex_ereg_search_exec()
1431 MBREX(search_regs) = (OnigRegion *)NULL; in _php_mb_regex_ereg_search_exec()
1479 option = MBREX(regex_default_options); in PHP_FUNCTION()
1480 syntax = MBREX(regex_default_syntax); in PHP_FUNCTION()
1485 …if ((MBREX(search_re) = php_mbregex_compile_pattern(arg_pattern, arg_pattern_len, option, syntax))… in PHP_FUNCTION()
1490 if (!Z_ISNULL(MBREX(search_str))) { in PHP_FUNCTION()
1491 zval_ptr_dtor(&MBREX(search_str)); in PHP_FUNCTION()
1494 ZVAL_STR_COPY(&MBREX(search_str), arg_str); in PHP_FUNCTION()
1497 MBREX(search_pos) = 0; in PHP_FUNCTION()
1500 MBREX(search_pos) = ZSTR_LEN(arg_str); in PHP_FUNCTION()
1504 if (MBREX(search_regs) != NULL) { in PHP_FUNCTION()
1505 onig_region_free(MBREX(search_regs), 1); in PHP_FUNCTION()
1506 MBREX(search_regs) = NULL; in PHP_FUNCTION()
1523 if (MBREX(search_regs) != NULL && Z_TYPE(MBREX(search_str)) == IS_STRING) { in PHP_FUNCTION()
1526 str = (OnigUChar *)Z_STRVAL(MBREX(search_str)); in PHP_FUNCTION()
1527 len = Z_STRLEN(MBREX(search_str)); in PHP_FUNCTION()
1528 n = MBREX(search_regs)->num_regs; in PHP_FUNCTION()
1530 beg = MBREX(search_regs)->beg[i]; in PHP_FUNCTION()
1531 end = MBREX(search_regs)->end[i]; in PHP_FUNCTION()
1538 if (onig_number_of_names(MBREX(search_re)) > 0) { in PHP_FUNCTION()
1541 Z_STRVAL(MBREX(search_str)), in PHP_FUNCTION()
1543 MBREX(search_regs) in PHP_FUNCTION()
1545 onig_foreach_name(MBREX(search_re), mb_regex_groups_iter, &args); in PHP_FUNCTION()
1561 RETVAL_LONG(MBREX(search_pos)); in PHP_FUNCTION()
1575 …if ((position < 0) && (!Z_ISUNDEF(MBREX(search_str))) && (Z_TYPE(MBREX(search_str)) == IS_STRING))… in PHP_FUNCTION()
1576 position += Z_STRLEN(MBREX(search_str)); in PHP_FUNCTION()
1579 …position < 0 || (!Z_ISUNDEF(MBREX(search_str)) && Z_TYPE(MBREX(search_str)) == IS_STRING && (size_… in PHP_FUNCTION()
1584 MBREX(search_pos) = position; in PHP_FUNCTION()
1594 *prev_options = MBREX(regex_default_options); in _php_mb_regex_set_options()
1597 *prev_syntax = MBREX(regex_default_syntax); in _php_mb_regex_set_options()
1599 MBREX(regex_default_options) = options; in _php_mb_regex_set_options()
1600 MBREX(regex_default_syntax) = syntax; in _php_mb_regex_set_options()
1627 opt = MBREX(regex_default_options); in PHP_FUNCTION()
1628 syntax = MBREX(regex_default_syntax); in PHP_FUNCTION()