summaryrefslogtreecommitdiff
path: root/Zend/zend_API.h
diff options
context:
space:
mode:
authorAndrei Zmievski <andrei@php.net>2006-08-04 21:05:59 +0000
committerAndrei Zmievski <andrei@php.net>2006-08-04 21:05:59 +0000
commitdda059708f20f30baca51d72f9d2beabdc6db2a7 (patch)
tree1b427802958061a467d5519891be3f45063fc275 /Zend/zend_API.h
parenteeea7d3b506eeaabd49cee851b375dd1d94e02dc (diff)
downloadphp-git-dda059708f20f30baca51d72f9d2beabdc6db2a7.tar.gz
Add add_assoc_zstr_ex() and related.
Diffstat (limited to 'Zend/zend_API.h')
-rw-r--r--Zend/zend_API.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index 57297f1a90..6d8353902a 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -332,6 +332,8 @@ ZEND_API int add_assoc_string_ex(zval *arg, char *key, uint key_len, char *str,
ZEND_API int add_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate);
ZEND_API int add_assoc_unicode_ex(zval *arg, char *key, uint key_len, UChar *str, int duplicate);
ZEND_API int add_assoc_unicodel_ex(zval *arg, char *key, uint key_len, UChar *str, uint length, int duplicate);
+ZEND_API int add_assoc_zstr_ex(zval *arg, char *key, uint key_len, zend_uchar str_type, zstr str, int duplicate);
+ZEND_API int add_assoc_zstrl_ex(zval *arg, char *key, uint key_len, zend_uchar str_type, zstr str, uint str_len, int duplicate);
ZEND_API int add_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value);
#define ZSTR_DUPLICATE (1<<0)
@@ -412,6 +414,8 @@ ZEND_API int add_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value);
#define add_assoc_stringl(__arg, __key, __str, __length, __duplicate) add_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate)
#define add_assoc_unicode(__arg, __key, __str, __duplicate) add_assoc_unicode_ex(__arg, __key, strlen(__key)+1, __str, __duplicate)
#define add_assoc_unicodel(__arg, __key, __str, __length, __duplicate) add_assoc_unicodel_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate)
+#define add_assoc_zstr(__arg, __key, __type, __str, __duplicate) add_assoc_zstr_ex(__arg, __key, strlen(__key)+1, __type, __str, __duplicate)
+#define add_assoc_zstrl(__arg, __key, __type, __str, __length, __duplicate) add_assoc_zstrl_ex(__arg, __key, strlen(__key)+1, __type, __str, __length, __duplicate)
#define add_assoc_zval(__arg, __key, __value) add_assoc_zval_ex(__arg, __key, strlen(__key)+1, __value)
#define add_assoc_rt_string(__arg, __key, __str, __duplicate) add_assoc_rt_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate)
#define add_assoc_rt_stringl(__arg, __key, __str, __length, __duplicate) add_assoc_rt_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate)
@@ -853,7 +857,7 @@ END_EXTERN_C()
#define ZVAL_ZSTR(z, zs, type, duplicate) { \
zstr __s=(zs); \
- Z_UNILEN_P(z) = (type==IS_UNICODE)?u_strlen(__s):strlen(__s); \
+ Z_UNILEN_P(z) = (type==IS_UNICODE)?u_strlen(__s.u):strlen(__s.s); \
Z_UNIVAL_P(z) = ZSTR(duplicate? \
((type==IS_UNICODE)? \
(void*)eustrndup(__s.u, Z_UNILEN_P(z)) \