diff options
author | Dmitry Stogov <dmitry@php.net> | 2010-05-24 14:11:39 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2010-05-24 14:11:39 +0000 |
commit | c5237d82bf01a762bb38f80def59b9c16cb84dc1 (patch) | |
tree | 6e769820ba97ef669765c6ecfeabb08faf9e6ebc /ext/spl/spl_heap.c | |
parent | 1cabc8cd3a3bf5c12a8ece9efb59e3f5381f1ae5 (diff) | |
download | php-git-c5237d82bf01a762bb38f80def59b9c16cb84dc1.tar.gz |
Added caches to eliminate repeatable run-time bindings of functions, classes, constants, methods and properties
Diffstat (limited to 'ext/spl/spl_heap.c')
-rw-r--r-- | ext/spl/spl_heap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c index 6f11ef92cf..45ec68096a 100644 --- a/ext/spl/spl_heap.c +++ b/ext/spl/spl_heap.c @@ -385,7 +385,6 @@ static zend_object_value spl_heap_object_new_ex(zend_class_entry *class_type, sp { zend_object_value retval; spl_heap_object *intern; - zval *tmp; zend_class_entry *parent = class_type; int inherited = 0; @@ -394,7 +393,7 @@ static zend_object_value spl_heap_object_new_ex(zend_class_entry *class_type, sp ALLOC_INIT_ZVAL(intern->retval); zend_object_std_init(&intern->std, class_type TSRMLS_CC); - zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); + object_properties_init(&intern->std, class_type); intern->flags = 0; intern->fptr_cmp = NULL; @@ -529,6 +528,10 @@ static HashTable* spl_heap_object_get_debug_info_helper(zend_class_entry *ce, zv *is_temp = 0; + if (!intern->std.properties) { + rebuild_object_properties(&intern->std); + } + if (intern->debug_info == NULL) { ALLOC_HASHTABLE(intern->debug_info); ZEND_INIT_SYMTABLE_EX(intern->debug_info, zend_hash_num_elements(intern->std.properties) + 1, 0); |