cvs: php4 /ext/standard output.c

From: Date: Wed, 11 Jul 2001 15:27:37 +0000
Subject: cvs: php4 /ext/standard output.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6187@lists.php.net to get a copy of this message
thies Wed Jul 11 11:27:37 2001 EDT Modified files: /php4/ext/standard output.c Log: use ZVAL_* macros Index: php4/ext/standard/output.c diff -u php4/ext/standard/output.c:1.62 php4/ext/standard/output.c:1.63 --- php4/ext/standard/output.c:1.62 Wed Jul 4 11:30:20 2001 +++ php4/ext/standard/output.c Wed Jul 11 11:27:37 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: output.c,v 1.62 2001/07/04 15:30:20 sas Exp $ */ +/* $Id: output.c,v 1.63 2001/07/11 15:27:37 thies Exp $ */ #include "php.h" #include "ext/standard/head.h" @@ -161,15 +161,12 @@ CLS_FETCH(); ALLOC_INIT_ZVAL(orig_buffer); - orig_buffer->value.str.val = OG(active_ob_buffer).buffer; - orig_buffer->value.str.len = OG(active_ob_buffer).text_length; - orig_buffer->type = IS_STRING; + ZVAL_STRINGL(orig_buffer,OG(active_ob_buffer).buffer,OG(active_ob_buffer).text_length,0); orig_buffer->refcount=2; /* don't let call_user_function() destroy our buffer */ orig_buffer->is_ref=1; ALLOC_INIT_ZVAL(z_status); - Z_TYPE_P(z_status) = IS_LONG; - Z_LVAL_P(z_status) = status; + ZVAL_LONG(z_status,status); params[0] = &orig_buffer; params[1] = &z_status; @@ -407,9 +404,7 @@ if (OG(nesting_level)==0) { return FAILURE; } - p->type = IS_STRING; - p->value.str.val = estrndup(OG(active_ob_buffer).buffer, OG(active_ob_buffer).text_length); - p->value.str.len = OG(active_ob_buffer).text_length; + ZVAL_STRINGL(p,OG(active_ob_buffer).buffer,OG(active_ob_buffer).text_length,1); return SUCCESS; } /* }}} */ @@ -423,8 +418,7 @@ if (OG(nesting_level) == 0) { return FAILURE; } - p->type = IS_LONG; - p->value.lval = OG(active_ob_buffer).text_length; + ZVAL_LONG(p,OG(active_ob_buffer).text_length); return SUCCESS; } /* }}} */

« previous php.cvs (#6187) next »