Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:18199 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54178 invoked by uid 1010); 17 Aug 2005 18:23:18 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 54163 invoked from network); 17 Aug 2005 18:23:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Aug 2005 18:23:18 -0000 X-Host-Fingerprint: 212.183.43.5 M2489P005.adsl.highway.telekom.at Received: from ([212.183.43.5:29705] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 61/63-33075-59083034 for ; Wed, 17 Aug 2005 14:23:17 -0400 Message-ID: <61.63.33075.59083034@pb1.pair.com> To: internals@lists.php.net Date: Wed, 17 Aug 2005 20:20:48 +0200 Organization: IWORKS User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040803 [ http://iworks.at ] X-Accept-Language: de-AT, de-DE, de, en, en-GB, en-US MIME-Version: 1.0 References: <61.69.24081.E876BF24@pb1.pair.com> <1997493019.20050816231952@marcus-boerger.de> <65.2E.33075.C74E2034@pb1.pair.com> In-Reply-To: <65.2E.33075.C74E2034@pb1.pair.com> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigDC0913705A4A5CB1805BE818" X-Posted-By: 212.183.43.5 Subject: Re: [PHP-DEV] Re: [PATCH] internal class' static properties and constants From: mike@php.net (Michael Wallner) --------------enigDC0913705A4A5CB1805BE818 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I wrote: > Hi Marcus Boerger, you wrote: >> Before your patch we have the situation that consts can only be >> decalred in user space. Thus it is ensured that their data is >> emalloc'd and only ever needs to be const-updated once. Now that >> you have this as well as your default static properties it >> (zend_update_class_constants()) must be called once for every >> request time. Having said that i think we actuall need two tables. >> cor consts as well. I think default_consts and >> default_static_properies never need to be const updated because >> otherwise you wouldn't react on define changes if a defined const >> is being referred to. With this in mind we also face another >> problem, the problem that const-update assumes that the memory was >> emalloc'd.So what we need to do is ensuring that on the first use >> in a request the two tables default_const and >> default_static_properties get copied to their working tables consts >> and static_properties. After that copy we can update the consts. >> Now we also ensured that for internal classes the values in the >> defualt_const table and default_static_properties table can become >> malloc'd. Now that I know what zval_update_constant() is good for... Is it even needed to call zend_update_class_constants() for ZEND_INTERNAL_CLASSes? One most probably won't declare a property of an internal class with a zval that's IS_CONSTANT. Thoughts? -- Michael - < mike(@)php.net > --------------enigDC0913705A4A5CB1805BE818 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (Cygwin) iD8DBQFDA4AD2pTtEijQyW0RAvLUAJ9TwT+AJlQgrEy6S9ODtbpOjzwWnwCeJCDK rmU1iUNsyzpiuDrTnJLsTos= =0PNY -----END PGP SIGNATURE----- --------------enigDC0913705A4A5CB1805BE818--