]> granicus.if.org Git - php/commitdiff
Cleanup
authorDmitry Stogov <dmitry@zend.com>
Thu, 24 Sep 2015 22:36:10 +0000 (01:36 +0300)
committerDmitry Stogov <dmitry@zend.com>
Thu, 24 Sep 2015 22:36:10 +0000 (01:36 +0300)
ext/spl/spl_array.c
ext/spl/spl_engine.c

index 19a1afecde32958d08c435b5ac32f1f78699e98f..d9ae242c4a68e921b2b4b201504e742eb603a29b 100644 (file)
@@ -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)) {
index f9105d005b35bf6a22fd368588869f1045b1494d..c9960d69ef9bd8d6c1cc135f53a3c38f1a9d37bd 100644 (file)
@@ -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 */
 }
 /* }}} */