Re: Re: Always set return_value_ptr?

From: Date: Tue, 27 Aug 2013 13:38:20 +0000
Subject: Re: Re: Always set return_value_ptr?
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Tue, Aug 27, 2013 at 11:40 AM, Nikita Popov <[email protected]> wrote:

> On Sat, Aug 3, 2013 at 8:16 PM, Nikita Popov <[email protected]> wrote:
>
> > Hi internals!
> >
> > Is there any particular reason why we only pass return_value_ptr to
> > internal functions if they have the ACC_RETURN_REFERENCE flag set?
> >
> > Why can't we always provide the retval ptr, even for functions that don't
> > return by reference? This would allow returning zvals without having to
> > copy them first (what RETVAL_ZVAL does).
> >
> > Motivation for this is the following SO question:
> > http://stackoverflow.com/q/17844379/385378
> >
>
> Patch for this change can be found here:
> https://github.com/php/php-src/pull/420
>
> The patch also adds new macros to allow easy use of this feature called
> RETVAL_ZVAL_FAST/RETURN_ZVAL_FAST (anyone got a better name?)
>
> If no one objects I'll merge this sometime soon.
>

After discussing this point, I'm +1 with this patch.

Julien.Pauli


Thread (10 messages)

« previous php.internals (#68626) next »