Permalink
Browse files

Make it possible to explicitly set refcount in ZEND_SET_SYMBOL_WITH_L…

…ENGTH(), part 2
  • Loading branch information...
1 parent 158088c commit 2ddc4fe4f54ac9ab15c3cf5cf75c0ab684666c91 @zsuraski zsuraski committed Dec 1, 1999
Showing with 3 additions and 0 deletions.
  1. +3 −0 Zend/zend_API.h
View
@@ -256,6 +256,9 @@ ZEND_API int add_property_stringl(zval *arg, char *key, char *str, uint length,
(var)->refcount = (*orig_var)->refcount; \
(var)->is_ref = 1; \
\
+ if (_refcount) { \
+ (var)->refcount += _refcount-1; \
+ } \
zval_dtor(*orig_var); \
**orig_var = *(var); \
efree(var); \

0 comments on commit 2ddc4fe

Please sign in to comment.