com php-src: Cleanup: ext/spl/spl_array.c ext/spl/spl_e ngine.c
| From: | Dmitry Stogov | Date: | Thu, 24 Sep 2015 22:36:10 +0000 |
| Subject: | com php-src: Cleanup: ext/spl/spl_array.c ext/spl/spl_e ngine.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89168@lists.php.net to get a copy of this message | ||
Commit: 01d5beddf4996eb2599f1bd62ae57bbc0298daf7
Author: Dmitry Stogov <dmitry@zend.com> Fri, 25 Sep 2015 01:36:10 +0300
Parents: ad4fa8f75810facff8bea509249a735232235443
Branches: PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=01d5beddf4996eb2599f1bd62ae57bbc0298daf7
Log:
Cleanup
Changed paths:
M ext/spl/spl_array.c
M ext/spl/spl_engine.c
Diff:
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index 19a1afe..d9ae242 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -386,12 +386,10 @@ static zval *spl_array_read_dimension_ex(int check_inherited, zval *object,
zval
}
}
ret = spl_array_get_dimension_ptr(check_inherited, object, offset, type);
- //!!! FIXME?
- // ZVAL_COPY(result, ret);
/* When in a write context,
* ZE has to be fooled into thinking this is in a reference set
- * by separating (if necessary) and returning as an is_ref=1 zval (even if refcount == 1)
+ * by separating (if necessary) and returning as IS_REFERENCE (with refcount == 1)
*/
if ((type == BP_VAR_W || type == BP_VAR_RW || type == BP_VAR_UNSET) &&
@@ -868,9 +866,7 @@ static zval *spl_array_get_property_ptr_ptr(zval *object, zval *member, int type
&& !std_object_handlers.has_property(object, member, 2, NULL)) {
return spl_array_get_dimension_ptr(1, object, member, type);
}
- //!!! FIXME
- //return std_object_handlers.get_property_ptr_ptr(object, member, type, key);
- return NULL;
+ return std_object_handlers.get_property_ptr_ptr(object, member, type, cache_slot);
} /* }}} */
static int spl_array_has_property(zval *object, zval *member, int has_set_exists, void
**cache_slot) /* {{{ */
@@ -1665,7 +1661,6 @@ SPL_METHOD(Array, serialize)
/* storage */
smart_str_appendl(&buf, "x:", 2);
- //!!! php_var_serialize need to be modified
php_var_serialize(&buf, &flags, &var_hash);
if (!(intern->ar_flags & SPL_ARRAY_IS_SELF)) {
diff --git a/ext/spl/spl_engine.c b/ext/spl/spl_engine.c
index f9105d0..c9960d6 100644
--- a/ext/spl/spl_engine.c
+++ b/ext/spl/spl_engine.c
@@ -35,8 +35,6 @@
PHPAPI void spl_instantiate(zend_class_entry *pce, zval *object)
{
object_init_ex(object, pce);
- Z_SET_REFCOUNT_P(object, 1);
- // !!!PZ_SET_ISREF_P(object); /* check if this can be hold always */
}
/* }}} */