Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85560 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96499 invoked from network); 30 Mar 2015 16:06:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Mar 2015 16:06:19 -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.213.52 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.213.52 mail-yh0-f52.google.com Received: from [209.85.213.52] ([209.85.213.52:33347] helo=mail-yh0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 94/05-04595-A7479155 for ; Mon, 30 Mar 2015 11:06:19 -0500 Received: by yhpt93 with SMTP id t93so58933925yhp.0 for ; Mon, 30 Mar 2015 09:06:16 -0700 (PDT) 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=X17GQAW5vMqnp1ExuiADQeC0GNnRPzse/8r7pAmJq+A=; b=QC9YYJ4kVAlABOeXxv2Aq+A0lWmt6RvzzRW8gr1CCoIR0g0IHyZ2qnJatq4hKpkG+k MvHLmNfCuK3pugG7wIy8gAc8FvdYS8ClubpLkUqBbbBpj8+dzLWUebnOOBi+5G+k8e8g xqc4uBjHs9HrotbfEH4MzMh0M35pLicOQ/K6F74fgUYq3FfwH4wzBnBM3UZbFT+2Wg36 WW1XxH2wWIL1F3dkqJJgpMQCjlW9IrLL42XgIbUl4wZ07pc+vfeI0PpOxjNugQuV1wEH QaVmR4ASfvfs33n88HFSswmLLNw/DyTMG2LKNsr0EFLZJYATrt6MKao/KdE2iZ87jT8M PCQA== X-Gm-Message-State: ALoCoQm04CzpzKDzoK8IYBk3qe9fK58qG4pgsr0eF/ymAeOPZ5EUPkS0ou4HTTkNN9heu0Q/mgyeQ99mloPW7niXOVzqP7+omERdBVymNJsjdtwZnTQ5I3wJEjmhEbv0UmNk0Dx/rkZNDab8v1rskZ7xcsCPOwcZxw== MIME-Version: 1.0 X-Received: by 10.52.78.35 with SMTP id y3mr35269514vdw.5.1427731576078; Mon, 30 Mar 2015 09:06:16 -0700 (PDT) Received: by 10.52.248.36 with HTTP; Mon, 30 Mar 2015 09:06:15 -0700 (PDT) In-Reply-To: References: Date: Mon, 30 Mar 2015 19:06:15 +0300 Message-ID: To: Dan Ackroyd Cc: "internals@lists.php.net" , Nikita Popov Content-Type: multipart/alternative; boundary=001a113403826d5b38051283a903 Subject: Re: [PHP-DEV] [RFC][VOTE] Constructor behaviour of internal classes From: dmitry@zend.com (Dmitry Stogov) --001a113403826d5b38051283a903 Content-Type: text/plain; charset=UTF-8 Hi Dan, The updated patch is at https://github.com/php/php-src/pull/1205 The main difference is in ext/intl. If you don't see any problems I can commit it. I didn't think about the classes you missed. Thanks. Dmitry. On Fri, Mar 27, 2015 at 7:32 PM, Dan Ackroyd wrote: > On 26 March 2015 at 20:19, Dmitry Stogov wrote: > Hi Dmitry, > > > however the patch looks a bit surprising to me. > > We have special function to do this - zend_ctor_make_null() and some > tricks in the VM. > > I made just a quick look over your patch but didn't find any references > to them. > > Surprising is usually not good, so let me see if I can explain. > > I touched the minimal amount of code needed to achieve the desired > behaviour. For the intl classes, the exception is being thrown by > telling the intl error handling code to use an exception, no matter > what the intl.use_exceptions setting is, if the error was emitted > during a constructor: > > https://github.com/Danack/php-src/blob/InternalClassClean/ext/intl/intl_error.c#L114 > > I didn't touch any of the code zend_ctor_make_null. I guess if it's > only used in these special cases, and they are going away it could > also be removed? But it sounds like that would be a job for someone > who understands that bit. > > > Please don't commit it yet. > > That won't be difficult, I don't have commit rights, and don't > particularly want them. > > > Nikita, could you also take a quick look. > > Nikita pointed out that I may have missed a couple of classes. I'll > try to get those updated before you have a look. > > cheers > Dan > --001a113403826d5b38051283a903--