Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68626 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69874 invoked from network); 27 Aug 2013 13:39:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Aug 2013 13:39:04 -0000 Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.177 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.128.177 mail-ve0-f177.google.com Received: from [209.85.128.177] ([209.85.128.177:34616] helo=mail-ve0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AA/31-62705-7FBAC125 for ; Tue, 27 Aug 2013 09:39:04 -0400 Received: by mail-ve0-f177.google.com with SMTP id cz11so3078402veb.36 for ; Tue, 27 Aug 2013 06:39:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=E7VnGc8p4FeCpEBRhBmC4cXql5SEh6sVJEcU7On6GDI=; b=ss1AhGDNm1JxsbaakCz7IXB76JSUZnyKaPRHNkAxsmbgQrsuF4DizcWt7GeUoS0gMd DJgD5367dbptBTLqAalTojiyZjV0WHJn50wMRKHyRd4nP9LwM/NURgxJSuEPb6DhEM4N eZTsVDpaokB0GL2Vnh52oB5TsnzI0nFLEisW4JMrqqnnQgkkIIwg4n2/zzi1/a2Kjq75 8vuOR01QZLW7m9/mE5W6zDtuyttRl2QXSn1lpnsr1VXZGZX6/0GrfIIbckIw7+oAPvCw CjNUifl/Xvpcc1ks0NnKcc/QRHle1flbi+u9dojwq+acLjcXro8D3Ve4r2vg6MiHrGQ8 N+aw== X-Received: by 10.221.51.206 with SMTP id vj14mr20359736vcb.17.1377610741012; Tue, 27 Aug 2013 06:39:01 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.220.73.197 with HTTP; Tue, 27 Aug 2013 06:38:20 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Aug 2013 15:38:20 +0200 X-Google-Sender-Auth: T8umJvR0fnypMQDNzFCBgiXNGKI Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11332252db603704e4edfe06 Subject: Re: [PHP-DEV] Re: Always set return_value_ptr? From: jpauli@php.net (Julien Pauli) --001a11332252db603704e4edfe06 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Aug 27, 2013 at 11:40 AM, Nikita Popov wrote: > On Sat, Aug 3, 2013 at 8:16 PM, Nikita Popov 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 --001a11332252db603704e4edfe06--