diff options
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index f1e9614a22..d4df4d3729 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -1757,6 +1757,20 @@ ZEND_API int add_property_double_ex(zval *arg, const char *key, uint key_len, do } /* }}} */ +ZEND_API int add_property_str_ex(zval *arg, const char *key, uint key_len, zend_string *str TSRMLS_DC) /* {{{ */ +{ + zval tmp; + zval z_key; + + ZVAL_STR(&tmp, str); + ZVAL_STRINGL(&z_key, key, key_len); + Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, &tmp, -1 TSRMLS_CC); +//??? zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */ + zval_ptr_dtor(&z_key); + return SUCCESS; +} +/* }}} */ + ZEND_API int add_property_string_ex(zval *arg, const char *key, uint key_len, const char *str TSRMLS_DC) /* {{{ */ { zval tmp; |