Hi Robert,
If I remember correctly, we came to the conclusion a while ago, that unless we make some big changes (which I'm not quite sure yet how far reaching they would be), then we could not malloc() constants. You would really need to emalloc()/efree() them on each request because the engine could connect to these malloced()'ed variables and all hell would break loose. Also we do a zval_update_constant() today in order to initialize constants with constants just before they are being used the first time.
What this basically means that you'd initialize and free these constants in RINIT()/RSHUTDOWN(). Not too sexy but looking at how much this is needed it's not too bad.
Andi
At 11:54 PM 10/11/2004 -0700, Robert Silva wrote:
This patch allows php extension authors to declare constants on internal objects. This pretty much just duplicates the zend_declare_property_* functions but for constants. Currently there is no way for C level class authors to declare constants on their objects since the engine has to allocate space for them.
Bob Silva
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php