Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32038 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67887 invoked by uid 1010); 4 Sep 2007 16:24:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 67872 invoked from network); 4 Sep 2007 16:24:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Sep 2007 16:24:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=nlopess@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=nlopess@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.55.154.22 as permitted sender) X-PHP-List-Original-Sender: nlopess@php.net X-Host-Fingerprint: 212.55.154.22 relay2.ptmail.sapo.pt Linux 2.4/2.6 Received: from [212.55.154.22] ([212.55.154.22:45597] helo=sapo.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 98/FD-21414-DB68DD64 for ; Tue, 04 Sep 2007 12:24:31 -0400 Received: (qmail 5113 invoked from network); 4 Sep 2007 16:24:25 -0000 Received: from unknown (HELO http13) (10.134.35.198) by relay2 with SMTP; 4 Sep 2007 16:24:25 -0000 Received: (qmail 5998 invoked by uid 64140); 4 Sep 2007 16:24:20 -0000 Received: from bl7-48-52.dsl.telepac.pt (bl7-48-52.dsl.telepac.pt [85.240.48.52]) by w13.mail.sapo.pt (Horde MIME library) with HTTP; Tue, 04 Sep 2007 17:24:20 +0100 Message-ID: <20070904172420.2yftwh0cg000kw0s@w13.mail.sapo.pt> Date: Tue, 04 Sep 2007 17:24:20 +0100 To: David Wang Cc: internals@lists.php.net, andi@php.net, dmitry@php.net References: <20070904162613.4qgfdddo7scw8o8w@w13.mail.sapo.pt> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.2-cvs) X-Originating-IP: 85.240.48.52 X-PTMail-Version: 3.1.5 Subject: Re: Re: [PHP-DEV] Patch for macros for tracking refcount and is_ref From: nlopess@php.net (Nuno Lopes) >> About the patch, the zval_*_p() functions don't really need to exist.. >> they can be macros as well. > > As I said, if those were macros, it would be very difficult to squeeze > more than one statement into them. > > Having multiple statements in Z_DELREF_P will also break that code. It > seems to me inline functions are the best solution (the second best > solution would be to put braces around the statements in the define, > but then no return value would be possible). currently you only have one statement in each of those functions.. anyway it's not critical to have static inline functions. >> (and the online keyword is also handled by >> the Zend engine) > > Do you mean ZEND_VM_ALWAYS_INLINE? There is a ZEND_VM_ALWAYS_INLINE > #define that does something similar to my "always_inline". However, it > doesn't work for Microsoft compilers, and since it doesn't include the > "inline" keyword within its definition, I'd have to change the meaning > of it in order to fix that. As far as I can tell, it's not referenced > by any code at all, but that still might be a bad idea. nops. The Zend engine redefines the inline keyword itself somewhere. Nuno