RE: [PHP-DEV] Returning References from Internal Functions

From: Date: Wed, 24 Aug 2005 10:44:11 +0000
Subject: RE: [PHP-DEV] Returning References from Internal Functions
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-18347@lists.php.net to get a copy of this message
Thank you Sara. Now the bug is fixed in PHP_5_1 and HEAD. The test is in attachment. Dmitry. > -----Original Message----- > From: Sara Golemon [mailto:pollita@php.net] > Sent: Wednesday, August 24, 2005 4:47 AM > To: internals@lists.php.net > Cc: Andi Gutmans > Subject: Re: [PHP-DEV] Returning References from Internal Functions > > > > There's some commented out code in there that refers to bug 34045: > > /* We shouldn't fix bad extensions here, > > because it can break proper ones (Bug #34045) > > if (!EX(function_state).function->common.return_reference) { > > EX_T(opline->result.u.var).var.ptr->is_ref = 0; > > EX_T(opline->result.u.var).var.ptr->refcount = 1; > > } > > */ > > > > With that code in there returning references would certainly never > > work so I'd be curious about the events leading up to that > removal as > > much as anything. > > > Doi... Ignore that particular comment. All that code does is > block reference passing when the arg info isn't set. (Which > would seem perfectly > reasonable...) > > The rest of it still stands, I just spent too long unfolding > engine code today decoding the fcall_returned_reference logic... :) > > -Sara > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

Attachment: [application/x-gzip] retref.tar.gz
« previous php.internals (#18347) next »