Re: Returning References from Internal Functions
| From: | Sara Golemon | Date: | Wed, 24 Aug 2005 00:47:11 +0000 |
| Subject: | Re: Returning References from Internal Functions | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-18331@lists.php.net to get a copy of this message | ||
> 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