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 >
signature.asc
Description: OpenPGP digital signature