moriyoshi Tue Apr 1 13:56:26 2003 EDT
Modified files:
/php4/ext/mbstring php_mbregex.c
Log:
Reverted the last patch; the problem is elsewhere..
Index: php4/ext/mbstring/php_mbregex.c
diff -u php4/ext/mbstring/php_mbregex.c:1.34 php4/ext/mbstring/php_mbregex.c:1.35
--- php4/ext/mbstring/php_mbregex.c:1.34 Tue Apr 1 13:44:00 2003
+++ php4/ext/mbstring/php_mbregex.c Tue Apr 1 13:56:26 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mbregex.c,v 1.34 2003/04/01 18:44:00 moriyoshi Exp $ */
+/* $Id: php_mbregex.c,v 1.35 2003/04/01 18:56:26 moriyoshi Exp $ */
#ifdef HAVE_CONFIG_H
@@ -96,6 +96,7 @@
{
MBSTRG(default_mbctype) = MBCTYPE_EUC;
MBSTRG(current_mbctype) = MBCTYPE_EUC;
+ zend_hash_init(&(MBSTRG(ht_rc)), 0, NULL, (void (*)(void *))
php_mb_regex_free_cache, 1);
MBSTRG(search_str) = (zval**)0;
MBSTRG(search_str_val) = (zval*)0;
MBSTRG(search_re) = (mb_regex_t*)0;
@@ -107,6 +108,7 @@
/* {{{ _php_mb_regex_globals_dtor */
void _php_mb_regex_globals_dtor(zend_mbstring_globals *pglobals TSRMLS_DC)
{
+ zend_hash_destroy(&MBSTRG(ht_rc));
}
/* }}} */
@@ -136,7 +138,6 @@
PHP_RINIT_FUNCTION(mb_regex)
{
MBSTRG(regex_default_options) = MBRE_OPTION_POSIXLINE;
- zend_hash_init(&(MBSTRG(ht_rc)), 0, NULL, (void (*)(void *))
php_mb_regex_free_cache, 0);
return SUCCESS;
}
@@ -166,7 +167,7 @@
efree(MBSTRG(search_regs));
MBSTRG(search_regs) = (struct mbre_registers*)0;
}
- zend_hash_destroy(&MBSTRG(ht_rc));
+ zend_hash_clean(&MBSTRG(ht_rc));
return SUCCESS;
}
@@ -233,7 +234,7 @@
const char *err_str = NULL;
mb_regex_t *rc = NULL;
- if(zend_hash_find(&MBSTRG(ht_rc), (char *)pattern, patlen+1, (void **) &rc) ==
FAILURE ||
+ if(1 || zend_hash_find(&MBSTRG(ht_rc), (char *)pattern, patlen+1, (void **)
&rc) == FAILURE ||
rc->options != options || rc->mbctype != mbctype) {
memset(pre, 0, sizeof(*pre));
pre->fastmap = (char*)emalloc((1 << MBRE_BYTEWIDTH)*sizeof(char));
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php