Re: Re: [PATCH] internal class' static properties and constants

From: Date: Wed, 17 Aug 2005 18:20:48 +0000
Subject: Re: Re: [PATCH] internal class' static properties and constants
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-18199@lists.php.net to get a copy of this message
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 >

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.internals (#18199) next »