summaryrefslogtreecommitdiff
path: root/main/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/output.c')
-rw-r--r--main/output.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/main/output.c b/main/output.c
index 5f36904c5e..b83eceff16 100644
--- a/main/output.c
+++ b/main/output.c
@@ -227,8 +227,8 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush TSRMLS
ALLOC_INIT_ZVAL(orig_buffer);
ZVAL_STRINGL(orig_buffer, OG(active_ob_buffer).buffer, OG(active_ob_buffer).text_length, 1);
- orig_buffer->refcount=2; /* don't let call_user_function() destroy our buffer */
- orig_buffer->is_ref=1;
+ Z_SET_REFCOUNT_P(orig_buffer, 2); /* don't let call_user_function() destroy our buffer */
+ Z_SET_ISREF_P(orig_buffer);
ALLOC_INIT_ZVAL(z_status);
ZVAL_LONG(z_status, status);
@@ -248,8 +248,8 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush TSRMLS
if (!just_flush) {
zval_ptr_dtor(&OG(active_ob_buffer).output_handler);
}
- orig_buffer->refcount -=2;
- if (orig_buffer->refcount <= 0) { /* free the zval */
+ Z_SET_REFCOUNT_P(orig_buffer, Z_REFCOUNT_P(orig_buffer) - 2);
+ if (Z_REFCOUNT_P(orig_buffer) <= 0) { /* free the zval */
zval_dtor(orig_buffer);
FREE_ZVAL(orig_buffer);
}
@@ -510,7 +510,7 @@ static int php_ob_init(uint initial_size, uint block_size, zval *output_handler,
/* do we have array(object,method) */
if (zend_is_callable(output_handler, 0, &handler_name)) {
SEPARATE_ZVAL(&output_handler);
- output_handler->refcount++;
+ Z_ADDREF_P(output_handler);
result = php_ob_init_named(initial_size, block_size, handler_name, output_handler, chunk_size, erase TSRMLS_CC);
efree(handler_name);
} else {