Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82515 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30403 invoked from network); 12 Feb 2015 07:30:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Feb 2015 07:30:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.169 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.169 mail-vc0-f169.google.com Received: from [209.85.220.169] ([209.85.220.169:58815] helo=mail-vc0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 65/12-13750-D965CD45 for ; Thu, 12 Feb 2015 02:30:38 -0500 Received: by mail-vc0-f169.google.com with SMTP id kv19so3074754vcb.0 for ; Wed, 11 Feb 2015 23:30:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=u8Au5jFN1gGsFUU0BOzEBcYAGZXnlgZ8YeEpyLF1/cs=; b=VPdkemFb+5UiyXPJzTdadFj4bXqiyXdKCBGNIy4vTb8A4dDvrPDaPOgk2PQpE+5qKz vGDj/oJeab9r5c5XD5PbD+KxrHcHWdCy5a+G2XJ2M97tAwYm0wyKDL8Y2FEYm4Ovwvuc GQvZQthGSsN3gG90KGA33EldMrufpfrNSTaZ5FKhGA0FJ1tCzrTIjQjOxFpJ/KtaDwWm yeTBrDs1iwtsZ0b65qLdd+mTAkuDFcjDPLC+a/xU1hcFu4tEAMRSvI4TqvRFXn3ke5R8 dyAagP7NI4DSw7vaOlhRB1g7qgQSVqwBMb6C/DVXrjQ4+Id3rmQ1G4RoshLjjbeUI1Se U1OQ== X-Gm-Message-State: ALoCoQkG5T4u6nw3hHUSqwHBktWaIo4JIMc0jItaXDX1kSDYAylmTbN3KhyYS/TpIQuWDaI+TQXsvzBKHg0avSf0HkLwlWUYSs7g7/7eLI7sXbswKnyMa3JR0Mq6qLpvh/2eHnxVcViZzxkpnVUwXrP2iNlqQ8R7OA== MIME-Version: 1.0 X-Received: by 10.220.98.136 with SMTP id q8mr1871373vcn.4.1423726234493; Wed, 11 Feb 2015 23:30:34 -0800 (PST) Received: by 10.52.74.73 with HTTP; Wed, 11 Feb 2015 23:30:34 -0800 (PST) In-Reply-To: References: Date: Thu, 12 Feb 2015 11:30:34 +0400 Message-ID: To: reeze Cc: Xinchen Hui , Yasuo Ohgaki , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11c20e5276e84c050edf186b Subject: Re: Proposal: Introduce a new macro:php_error_docref_ex() From: dmitry@zend.com (Dmitry Stogov) --001a11c20e5276e84c050edf186b Content-Type: text/plain; charset=UTF-8 We don't use macros with variable number of arguments in PHP. this is not portable. Thanks. Dmitry. On Wed, Feb 11, 2015 at 6:01 PM, reeze wrote: > Hi, > > On 11 February 2015 at 19:15, Dmitry Stogov wrote: > >> Hi, >> >> I don't think it'll improve something, and may complicate merging from >> PHP5 (this is not a big issue, because merging is already not simple). >> >> > Yes it just makes code looks a little better and cleaner. > > I didn't realized the merging problem. that might affect diffs which > changes php_error_docref() > > >> In any case, the names should be swapped, to be used as: >> >> php_error_docref(E_WARNING, "recursion detected"); >> >> or >> >> php_error_docref_ex(NULL, E_WARNING, "recursion detected"); >> > > Yes I prefer this too. > > But considering the merging problem, I think I should hold this idea of > update all of those calls. > > We may provider a simple version with default null docref for external > extesions, but I didn't have proper name for that. > > >> >> >> also macros with __VA_ARGS__ may be not portable, s it should be >> implemented differently. >> > > Yes I should use ##__VA_ARGS__ instead. > > >> Thanks. Dmitry. >> >> >> >> On Wed, Feb 11, 2015 at 11:41 AM, Xinchen Hui wrote: >> >>> Hey: >>> >>> On Wed, Feb 11, 2015 at 4:35 PM, Yasuo Ohgaki >>> wrote: >>> > Hi all, >>> > >>> > On Wed, Feb 11, 2015 at 5:21 PM, reeze wrote: >>> >> >>> >> I think it is a cleanup, it works but there are too many duplication. >>> it >>> >> is the time to make the code clean and easier to understand. >>> > >>> > >>> > I've never used other than NULL also. >>> > Everyone is going to remove TSRM macros, it's right time to clean up. >>> fine, if you want to change.. >>> >>> please, _ex means extending, >>> >>> so the name should not be php_error_docref_ex... >>> >>> thanks >>> > >>> > Regards, >>> > >>> > -- >>> > Yasuo Ohgaki >>> > yohgaki@ohgaki.net >>> >>> >>> >>> -- >>> Xinchen Hui >>> @Laruence >>> http://www.laruence.com/ >>> >> >> > > > -- > Reeze Xia > http://reeze.cn > --001a11c20e5276e84c050edf186b--