diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2014-02-14 14:55:48 +0400 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2014-02-14 14:55:48 +0400 |
| commit | 686a078258ec13b0e2d0a9ff581f07bef0ae2662 (patch) | |
| tree | 8d5e2bcf15109b719b270bbe2ff283845f1e31a7 /Zend/zend_API.c | |
| parent | a52817eb027f2f90973888f35578d7b9eaf51d10 (diff) | |
| download | php-git-686a078258ec13b0e2d0a9ff581f07bef0ae2662.tar.gz | |
Use better data structures (incomplete)
Diffstat (limited to 'Zend/zend_API.c')
| -rw-r--r-- | Zend/zend_API.c | 9 |
1 files changed, 9 insertions, 0 deletions
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; |
