Always set return_value_ptr?
| From: | Nikita Popov | Date: | Sat, 03 Aug 2013 18:16:42 +0000 |
| Subject: | Always set return_value_ptr? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-68364@lists.php.net to get a copy of this message | ||
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
Thanks,
Nikita