summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>1999-09-29 15:25:06 +0000
committerThies C. Arntzen <thies@php.net>1999-09-29 15:25:06 +0000
commit446e5d0fffe571adae92b3f8c5e8dcf55608700f (patch)
tree22a23c341a2ff8cde44a81127e6b6d41c139f14e /Zend/zend_API.c
parent16ff84429abb62b7828f7b75a02d4bf84972e528 (diff)
downloadphp-git-446e5d0fffe571adae92b3f8c5e8dcf55608700f.tar.gz
added add_property_resource
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 23db2b88f1..5b4458702c 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -491,6 +491,16 @@ 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_resource(zval *arg, char *key, long n)
+{
+ zval *tmp = (zval *) emalloc(sizeof(zval));
+
+ tmp->type = IS_RESOURCE;
+ tmp->value.lval = n;
+ 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_double(zval *arg, char *key, double d)
{