]> granicus.if.org Git - php/commitdiff
Use better data structures (incomplete)
authorDmitry Stogov <dmitry@zend.com>
Fri, 14 Feb 2014 10:55:48 +0000 (14:55 +0400)
committerDmitry Stogov <dmitry@zend.com>
Fri, 14 Feb 2014 10:55:48 +0000 (14:55 +0400)
Zend/zend_API.c
Zend/zend_execute_API.c

index 08d525d15e9c7c75a9ab097d4741b9ab93965606..356147d91283587ef9625b08276aa32d079b3090 100644 (file)
@@ -1373,6 +1373,15 @@ ZEND_API int add_index_double(zval *arg, ulong index, double d) /* {{{ */
 }
 /* }}} */
 
+ZEND_API int add_index_str(zval *arg, ulong index, zend_string *str) /* {{{ */
+{
+       zval tmp;
+
+       ZVAL_STR(&tmp, str);
+       return zend_hash_index_update(Z_ARRVAL_P(arg), index, &tmp) ? SUCCESS : FAILURE;
+}
+/* }}} */
+
 ZEND_API int add_index_string(zval *arg, ulong index, const char *str, int duplicate) /* {{{ */
 {
        zval tmp;
index 489425082795f21c828b9c75e405495be6556ac0..0e95e8f8f58b9fc3a6ea4cc79115a859370a9f9a 100644 (file)
@@ -42,8 +42,8 @@ ZEND_API void (*zend_execute_ex)(zend_execute_data *execute_data TSRMLS_DC);
 ZEND_API void (*zend_execute_internal)(zend_execute_data *execute_data_ptr, zend_fcall_info *fci, int return_value_used TSRMLS_DC);
 
 /* true globals */
-//???ZEND_API const zend_fcall_info empty_fcall_info = { 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0 };
-//???ZEND_API const zend_fcall_info_cache empty_fcall_info_cache = { 0, NULL, NULL, NULL, NULL };
+ZEND_API const zend_fcall_info empty_fcall_info = { 0, NULL, {{0},0}, NULL, NULL, 0, NULL, NULL, 0 };
+ZEND_API const zend_fcall_info_cache empty_fcall_info_cache = { 0, NULL, NULL, NULL, NULL };
 
 #ifdef ZEND_WIN32
 #include <process.h>