Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13337 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86832 invoked by uid 1010); 15 Oct 2004 00:13:56 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 86739 invoked from network); 15 Oct 2004 00:13:55 -0000 Received: from unknown (HELO mail.zend.com) (80.74.107.235) by pb1.pair.com with SMTP; 15 Oct 2004 00:13:55 -0000 Received: (qmail 13350 invoked from network); 15 Oct 2004 00:13:52 -0000 Received: from localhost (HELO AndiNotebook.zend.com) (127.0.0.1) by localhost with SMTP; 15 Oct 2004 00:13:52 -0000 Message-ID: <5.1.0.14.2.20041014170918.02c8aec0@localhost> X-Sender: andi@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 14 Oct 2004 17:13:48 -0700 To: "Robert Silva" , In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] [PATCH] Resubmitted for review From: andi@zend.com (Andi Gutmans) References: 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