summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2002-04-30 11:30:07 +0000
committerStanislav Malyshev <stas@php.net>2002-04-30 11:30:07 +0000
commit18805e8323c351de5c02a00616ecfabce62afdcd (patch)
treea2deefbea05fc86eb6941557df82a4091dd6e627
parent3dd6217c0b9e5973c750d0b14931b30cbc8009e1 (diff)
downloadphp-git-18805e8323c351de5c02a00616ecfabce62afdcd.tar.gz
ZE2 compatibility fix
-rw-r--r--ext/standard/browscap.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c
index 8a13ebacaa..8c696c5fad 100644
--- a/ext/standard/browscap.c
+++ b/ext/standard/browscap.c
@@ -108,6 +108,8 @@ static void php_browscap_parser_cb(zval *arg1, zval *arg2, int callback_type, vo
break;
case ZEND_INI_PARSER_SECTION: {
zval *processed;
+ HashTable *section_properties;
+ TSRMLS_FETCH();
/*printf("'%s' (%d)\n",$1.value.str.val,$1.value.str.len+1);*/
current_section = (zval *) malloc(sizeof(zval));
@@ -115,18 +117,17 @@ static void php_browscap_parser_cb(zval *arg1, zval *arg2, int callback_type, vo
processed = (zval *) malloc(sizeof(zval));
INIT_PZVAL(processed);
- /* OBJECTS_FIXME */
- Z_OBJCE_P(current_section) = ZEND_STANDARD_CLASS_DEF_PTR;
- Z_OBJPROP_P(current_section) = (HashTable *) malloc(sizeof(HashTable));
- Z_TYPE_P(current_section) = IS_OBJECT;
- zend_hash_init(Z_OBJPROP_P(current_section), 0, NULL, (dtor_func_t) browscap_entry_dtor, 1);
+ section_properties = (HashTable *) malloc(sizeof(HashTable));
+ _object_and_properties_init(current_section, ZEND_STANDARD_CLASS_DEF_PTR, section_properties ZEND_FILE_LINE_CC TSRMLS_CC);
+
+ zend_hash_init(section_properties, 0, NULL, (dtor_func_t) browscap_entry_dtor, 1);
zend_hash_update(&browser_hash, Z_STRVAL_P(arg1), Z_STRLEN_P(arg1)+1, (void *) &current_section, sizeof(zval *), NULL);
Z_STRVAL_P(processed) = Z_STRVAL_P(arg1);
Z_STRLEN_P(processed) = Z_STRLEN_P(arg1);
Z_TYPE_P(processed) = IS_STRING;
convert_browscap_pattern(processed);
- zend_hash_update(Z_OBJPROP_P(current_section), "browser_name_pattern", sizeof("browser_name_pattern"), (void *) &processed, sizeof(zval *), NULL);
+ zend_hash_update(section_properties, "browser_name_pattern", sizeof("browser_name_pattern"), (void *) &processed, sizeof(zval *), NULL);
}
break;
}