diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-09 22:37:41 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-09 22:37:41 +0100 |
commit | 49d88d98a0656233f15923d31ea67a1ed229e514 (patch) | |
tree | 04bb753e4d5434c46bd90048e52d22260052334d /src/base.cpp | |
parent | bdca5b0454534413f10d13211885c086fafff35a (diff) |
work in progress on iterators
Diffstat (limited to 'src/base.cpp')
-rw-r--r-- | src/base.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/base.cpp b/src/base.cpp index a96a6ce..305821f 100644 --- a/src/base.cpp +++ b/src/base.cpp @@ -50,8 +50,10 @@ MixedObject *Base::store(zend_class_entry *entry) // store the class entry in the newly created object result->php.ce = entry; + + // @todo is this really necessary - and when do we destruct this data? + // (if we remove this code, everything breaks down in a for ($object as $k => $v) loop) -#if PHP_VERSION_ID < 50399 // the original create_object fills the initial object with the default properties, // we're going to do exactly the same. start with setting up a hashtable for the props ALLOC_HASHTABLE(result->php.properties); @@ -59,6 +61,7 @@ MixedObject *Base::store(zend_class_entry *entry) // initialize the hash table zend_hash_init(result->php.properties, 0, NULL, ZVAL_PTR_DTOR, 0); +#if PHP_VERSION_ID < 50399 // initialize the properties zend_hash_copy(result->php.properties, &entry->default_properties, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval*)); #else |