Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77053 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64393 invoked from network); 4 Sep 2014 12:23:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Sep 2014 12:23:11 -0000 Authentication-Results: pb1.pair.com header.from=bobwei9@hotmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bobwei9@hotmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.com designates 65.55.116.28 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.116.28 blu004-omc1s17.hotmail.com Received: from [65.55.116.28] ([65.55.116.28:60042] helo=BLU004-OMC1S17.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/D1-53069-EA958045 for ; Thu, 04 Sep 2014 08:23:10 -0400 Received: from BLU437-SMTP58 ([65.55.116.7]) by BLU004-OMC1S17.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22724); Thu, 4 Sep 2014 05:23:08 -0700 X-TMN: [oyLe4lTeG+vWy3tThNYYchvddtPzLnjp] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Received: from bobweinandsimac.fritz.box ([78.141.130.2]) by BLU437-SMTP58.smtp.hotmail.com over TLS secured channel with Microsoft SMTPSVC(8.0.9200.16384); Thu, 4 Sep 2014 05:23:05 -0700 Content-Type: multipart/alternative; boundary="Apple-Mail=_82D70595-38BE-4CF8-B286-D7FC5894196A" Date: Thu, 4 Sep 2014 14:23:02 +0200 CC: Dmitry Stogov To: PHP internals MIME-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) X-Mailer: Apple Mail (2.1878.6) X-OriginalArrivalTime: 04 Sep 2014 12:23:06.0069 (UTC) FILETIME=[FAEF7850:01CFC83A] Subject: Fast zend_parse_parameters API From: bobwei9@hotmail.com (Bob Weinand) --Apple-Mail=_82D70595-38BE-4CF8-B286-D7FC5894196A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="windows-1252" After a long time=85 back to our fast_zpp RFC. Initially Dmitry proposed to have two different APIs, one for the fast = version, one for current version: #if FAST_ZPP /* new API */ #else /* old style zend_parse_parameters API */ #endif I don't really like the idea of having two different APIs, so I'd rather = propose to use one same public API for both. That API should, depending on some compile-time flag (per file or = globally in zend_API.h), either convert to the usual variadic style = function, or expand to the new fast variant of API parsing (with = directly inlining parameter type specific functions). What do you think about having one unified API for both, instead of the = current (like it's in some places in master branch currently)? (p.s.: The rewrite of the current API can be done safely via some PHP = script I wrote) Also, there is the question about how to structure the API; we (I and = Dmitry) basically have now two different proposals: ZEND_PARSE_PARAMETERS_START(3, 5) Z_PARAM_ZVAL(regex) Z_PARAM_ZVAL(replace) Z_PARAM_ZVAL(subject) Z_PARAM_OPTIONAL Z_PARAM_LONG(limit) Z_PARAM_ZVAL_EX(zcount, 0, 1) ZEND_PARSE_PARAMETERS_END_EX(return); OR zend_parse_parameters(ZPP_ZVAL(regex) ZPP_ZVAL(replace) = ZPP_ZVAL(subject) ZPP_OPTIONAL ZPP_LONG(limit) ZPP_ZVAL_EX(zcount, = ZPP_BY_REF), { return; }) We'd like to have some discussions about what API to use for the next = years. If you have some better API, feel free to propose it. Thanks, Bob= --Apple-Mail=_82D70595-38BE-4CF8-B286-D7FC5894196A--