RE: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-31 Thread Andi Gutmans
age- > From: Andi Gutmans [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 30, 2005 10:57 PM > To: Zeev Suraski; Dmitry Stogov > Cc: 'Michael Wallner'; internals@lists.php.net > Subject: RE: [PHP-DEV] Re: Constants and static methods for > internal classes > >

RE: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-31 Thread Dmitry Stogov
Ops. Thanks. I'll fix this. Dmitry. > -Original Message- > From: Michael Wallner [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 31, 2005 8:59 PM > To: internals@lists.php.net; Dmitry Stogov > Subject: Re: [PHP-DEV] Re: Constants and static methods for

Re: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-31 Thread Michael Wallner
Hi Dmitry Stogov, you wrote: > zend_update_class_constants() will be called for every request automatic (if > it is necessary) Well, sure it will be called, but it has no affect as ce->constants_updated is already set to 1 -- maybe I'm just missing the obvious... I still get segfaults because of

RE: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-31 Thread Dmitry Stogov
> -Original Message- > From: Michael Wallner [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 31, 2005 12:57 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] Re: Constants and static methods for > internal classes > > >>There's also a pr

RE: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-31 Thread Dmitry Stogov
mitry Stogov > Cc: 'Michael Wallner'; internals@lists.php.net > Subject: RE: [PHP-DEV] Re: Constants and static methods for > internal classes > > > Okay so if we're going RC2, then I think we can also MFH instanceof > (which is a tiny patch). > > And

Re: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-31 Thread Michael Wallner
Hi Dmitry Stogov, you wrote: >>There's a typo in zend_update_class_constants(): >> ALLOC_HASHTABLE() refers to class_type instead of >>class_type->static_members > > Seems you are wrong. > I see ALLOC_HASHTABLE(class_type->static_members); in the patch. Sorry my fault while applying the pa

RE: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-30 Thread Andi Gutmans
Thanks. Dmitry. > -Original Message- > From: Michael Wallner [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 30, 2005 4:50 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] Re: Constants and static methods for > internal classes > > > Hi Dmitry Stogov, you wrote

RE: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-30 Thread Zeev Suraski
nternals@lists.php.net > Subject: Re: [PHP-DEV] Re: Constants and static methods for > internal classes > > > Hi Dmitry Stogov, you wrote: > > > As I understand the whole patch is OK for you. > > Yep, I still need to test it because your patch is against > HEAD and I n

Re: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-30 Thread Marcus Boerger
y, August 30, 2005 4:50 PM >> To: internals@lists.php.net >> Subject: Re: [PHP-DEV] Re: Constants and static methods for >> internal classes >> >> >> Hi Dmitry Stogov, you wrote: >> >> > As I understand the whole patch is OK for you. >&

RE: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-30 Thread Dmitry Stogov
Hi, > -Original Message- > From: Michael Wallner [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 30, 2005 7:34 PM > To: internals@lists.php.net > Cc: Dmitry Stogov > Subject: Re: [PHP-DEV] Re: Constants and static methods for > internal classes > > &g

Re: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-30 Thread Michael Wallner
Hi Dmitry Stogov, you wrote: > OK. Let me know if you will find any problems with patch. There's a typo in zend_update_class_constants(): ALLOC_HASHTABLE() refers to class_type instead of class_type->static_members There's also a problem which I didn't track down yet: static_mem

RE: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-30 Thread Dmitry Stogov
ED] > Sent: Tuesday, August 30, 2005 4:50 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] Re: Constants and static methods for > internal classes > > > Hi Dmitry Stogov, you wrote: > > > As I understand the whole patch is OK for you. > > Yep, I stil

Re: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-30 Thread Michael Wallner
Hi Dmitry Stogov, you wrote: > As I understand the whole patch is OK for you. Yep, I still need to test it because your patch is against HEAD and I need to port it to PHP_5_1 because my extension is not unicode aware. My main concern is that it works (of course) and that it's not to hard for the

RE: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-30 Thread Dmitry Stogov
--Original Message- > From: Michael Wallner [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 30, 2005 3:49 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] Re: Constants and static methods for > internal classes > > > I wrote: > > > In case of zend_

Re: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-30 Thread Michael Wallner
I wrote: > In case of zend_update_static_property(), because one would need > to replicate the body of that function at each writing access? Please note that the code I'm currently using has changed from the original patch: int zend_update_static_property(zend_class_entry *scope, char *name, si

Re: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-30 Thread Michael Wallner
Hi Dmitry Stogov, you wrote: > Static members works with this patch (except array and constant properties) > without any additional requirements for extension. See test extension in > first email. Developer should just call zend_declare_property_...() or > zend_declare_class_constant_...() in MINI

RE: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-30 Thread Dmitry Stogov
> I think we could avoid this by stretching > the minimalistic approach a bit and provide at least a > zend_init_static_properties(). We don't need zend_init_static_properties() at all. The initialization performs automatic before any access to static member in zend_update_class_constants(). Dm

RE: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-30 Thread Dmitry Stogov
Hi, > -Original Message- > From: Michael Wallner [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 30, 2005 1:56 PM > To: internals@lists.php.net; Dmitry Stogov > Cc: internals@lists.php.net; Andi Gutmans > Subject: [PHP-DEV] Re: Constants and static methods for

[PHP-DEV] Re: Constants and static methods for internal classes

2005-08-30 Thread Michael Wallner
I wrote: > So why burden the weigh of allocation, initialization, destruction > and freeing on the extension developer? This will force every extension > writer to implement a kind of my dup_zval() function, wouldn't it? > And as there's not much reference devs will spam the list on how > to use

[PHP-DEV] Re: Constants and static methods for internal classes

2005-08-30 Thread Michael Wallner
Hi Dmitry Stogov, you wrote: > The patch is maden for "easiest" usage and it doesn't support internal > array/constants properties (they weren't supported before). So why burden the weigh of allocation, initialization, destruction and freeing on the extension developer? This will force every ext

RE: [PHP-DEV] Re: Constants and static methods for internal classes

2005-08-30 Thread Dmitry Stogov
> -Original Message- > From: Michael Wallner [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 30, 2005 12:24 PM > To: internals@lists.php.net > Subject: [PHP-DEV] Re: Constants and static methods for > internal classes > > > Hi Dmitry Stogov, you wrot

[PHP-DEV] Re: Constants and static methods for internal classes

2005-08-30 Thread Michael Wallner
Hi Dmitry Stogov, you wrote: > You can look into proposal patch that implements support for constants and > static methods for internal classes. The original patch was written by > Michael and improved by me. Is it my (mailers) fault or didn't the patch make it through? Thanks, -- Michael - <