Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65136 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59015 invoked from network); 23 Jan 2013 23:45:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jan 2013 23:45:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=cpriest@zerocue.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cpriest@zerocue.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zerocue.com designates 67.200.53.250 as permitted sender) X-PHP-List-Original-Sender: cpriest@zerocue.com X-Host-Fingerprint: 67.200.53.250 mail.zerocue.com Received: from [67.200.53.250] ([67.200.53.250:46426] helo=mail.zerocue.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E1/08-30997-B2670015 for ; Wed, 23 Jan 2013 18:45:47 -0500 Received: from [172.17.0.122] (unknown [70.112.216.188]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.zerocue.com (Postfix) with ESMTPSA id E4A451203A3; Wed, 23 Jan 2013 23:45:43 +0000 (UTC) Message-ID: <5100761E.2090403@zerocue.com> Date: Wed, 23 Jan 2013 17:45:34 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Crypto Compress CC: internals@lists.php.net References: <510038C9.5000900@mrclay.org> <510065B8.7040608@zerocue.com> <510066F2.3040202@lerdorf.com> <5100675A.9040809@zerocue.com> <51006C84.2090307@googlemail.com> In-Reply-To: <51006C84.2090307@googlemail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] C# properties vs. accessors RFC From: cpriest@zerocue.com (Clint Priest) On 1/23/2013 5:04 PM, Crypto Compress wrote: > guard->in_unset = 1; /* Prevent recursion */ > zend_call_method_with_1_params(&object, zobj->ce, &zobj->ce->__unset, > ZEND_UNSET_FUNC_NAME, NULL, member); > guard->in_unset = 0; /* Prevent recursion */ > a) That applies to __unset (magic method) only b) guard is name specific (another name would have a different guard) c) Those three lines are not new code, they have just been moved around a bit. The code (for unset accessors) you are looking for is here: https://github.com/cpriest/php-src/blob/accessors-5.5/Zend/zend_object_handlers.c#L986 > this code would only prevent nested/parallel access to same accessor > but not circular? > e.g.: getter -> setter -> null-checker -> null-setter -> getter > sorry it this is a dumb question :) > > cryptocompress > -- -Clint