From: Dmitry Stogov Date: Fri, 14 Feb 2014 10:55:48 +0000 (+0400) Subject: Use better data structures (incomplete) X-Git-Tag: POST_PHPNG_MERGE~412^2~648 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=686a078258ec13b0e2d0a9ff581f07bef0ae2662;p=php Use better data structures (incomplete) --- diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 08d525d15e..356147d912 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -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; diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 4894250827..0e95e8f8f5 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -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