From: Nikita Popov Date: Fri, 10 Oct 2014 13:32:04 +0000 (+0200) Subject: Remove retval member in spl_dllist X-Git-Tag: POST_NATIVE_TLS_MERGE^2~75^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=471e71537f06ca4adef8c919f836956c8eb3422d;p=php Remove retval member in spl_dllist Seems pretty useless, unless I'm missing something? --- diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c index 0a6f97c563..945f7c7ab4 100644 --- a/ext/spl/spl_dllist.c +++ b/ext/spl/spl_dllist.c @@ -86,7 +86,6 @@ struct _spl_dllist_object { spl_ptr_llist *llist; int traverse_position; spl_ptr_llist_element *traverse_pointer; - zval retval; int flags; zend_function *fptr_offset_get; zend_function *fptr_offset_set; @@ -358,7 +357,6 @@ static void spl_dllist_object_free_storage(zend_object *object TSRMLS_DC) /* {{{ spl_ptr_llist_destroy(intern->llist TSRMLS_CC); SPL_LLIST_CHECK_DELREF(intern->traverse_pointer); - zval_ptr_dtor(&intern->retval); if (intern->debug_info != NULL) { zend_hash_destroy(intern->debug_info); @@ -482,10 +480,8 @@ static int spl_dllist_object_count_elements(zval *object, zend_long *count TSRML zval rv; zend_call_method_with_0_params(object, intern->std.ce, &intern->fptr_count, "count", &rv); if (!Z_ISUNDEF(rv)) { - zval_ptr_dtor(&intern->retval); - ZVAL_ZVAL(&intern->retval, &rv, 0, 0); - convert_to_long(&intern->retval); - *count = (zend_long) Z_LVAL(intern->retval); + *count = zval_get_long(&rv); + zval_ptr_dtor(&rv); return SUCCESS; } *count = 0;