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:[EMAIL PROTECTED] > 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 > >
retref.tar.gz
Description: GNU Zip compressed data
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php