summaryrefslogtreecommitdiff
path: root/Zend/zend_variables.c
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2010-08-12 07:58:14 +0000
committerSascha Schumann <sas@php.net>2010-08-12 07:58:14 +0000
commit50a0ea7b8cede077220902733bd4efec59bf41d8 (patch)
tree4dedea7880a9e871946d268e4d2b1a5714d8bad9 /Zend/zend_variables.c
parent49f22527cc57f49d6b3b6bbd312715eaee878990 (diff)
downloadphp-git-50a0ea7b8cede077220902733bd4efec59bf41d8.tar.gz
separate properties of internal classes in ZTS mode fully,
otherwise multiple threads will modify the zvals' contents without any synchronisation.
Diffstat (limited to 'Zend/zend_variables.c')
-rw-r--r--Zend/zend_variables.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index dce98ba22c..dd190d8ee2 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -159,6 +159,17 @@ ZEND_API void _zval_dtor_wrapper(zval *zvalue)
zval_dtor(zvalue);
}
+ZEND_API void zval_property_ctor(zval **p) /* {{{ */
+{
+ zval *orig_ptr = *p;
+
+ ALLOC_ZVAL(*p);
+ **p = *orig_ptr;
+ zval_copy_ctor(*p);
+ Z_SET_REFCOUNT_PP(p, 1);
+ Z_UNSET_ISREF_PP(p);
+}
+/* }}} */
#if ZEND_DEBUG
ZEND_API void _zval_copy_ctor_wrapper(zval *zvalue)