summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorAndrei Zmievski <andrei@php.net>2000-02-01 23:12:48 +0000
committerAndrei Zmievski <andrei@php.net>2000-02-01 23:12:48 +0000
commitb995d2cc2f9bb0ecd8ecedcfb7dd476479f1adfe (patch)
tree80eefa3d3d7d17041141e1a8196fb1d19c2378b3 /Zend/zend_API.c
parent83a027817160ec6d72adee13ca845d4306e837b6 (diff)
downloadphp-git-b995d2cc2f9bb0ecd8ecedcfb7dd476479f1adfe.tar.gz
Added add_property_unset() and add_property_bool().
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index b34ddce287..d338f72521 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -611,6 +611,27 @@ ZEND_API inline int add_property_long(zval *arg, char *key, long n)
return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
}
+ZEND_API inline int add_property_bool(zval *arg, char *key, int b)
+{
+ zval *tmp;
+
+ ALLOC_ZVAL(tmp);
+ tmp->type = IS_BOOL;
+ tmp->value.lval = b;
+ INIT_PZVAL(tmp);
+ return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
+}
+
+ZEND_API inline int add_property_unset(zval *arg, char *key)
+{
+ zval *tmp;
+
+ ALLOC_ZVAL(tmp);
+ tmp->type = IS_NULL;
+ INIT_PZVAL(tmp);
+ return zend_hash_update(arg->value.obj.properties, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
+}
+
ZEND_API inline int add_property_resource(zval *arg, char *key, long n)
{
zval *tmp;