OK, I just noticed class_entry->builtin_functions which I can probably use.

Sam

> -----Original Message-----
> From: Sam Liddicott 
> Sent: 23 April 2002 16:19
> To: Sam Liddicott; 'Rasmus Lerdorf'
> Cc: 'PHP Developers Mailing List'
> Subject: RE: [PHP-DEV] MINIT or RINIT
> 
> 
> It seems like if I use zend_register_internal_class then I 
> can't make use of the .function table of my class entry 
> because zend_register_internal class null's this out.
> 
> Is there an entirely good reason for this?
> 
> I want the internal class to have its functions registered 
> seperatly with zend_hash_add(class_entry.function_table,....
> But I don't want the class damaged at RSHUTDOWN.
> 
> Do these desires conflict?
> At least I will have to reproduce much of 
> zend_register_internal_class but preserve the function table.
> 
> Are there any other side effects of being ZEND_INTERNAL_CLASS 
> instead of ZEND_USER_CLASS?  Perhaps it will be safer to 
> register as ZEND_USER_CLASS in RINIT instead of 
> ZEND_INTERNAL_CLASS in MINIT?
> 
> Sam
> 
> > -----Original Message-----
> > From: Sam Liddicott 
> > Sent: 23 April 2002 15:50
> > To: Rasmus Lerdorf; Sam Liddicott
> > Cc: PHP Developers Mailing List
> > Subject: RE: [PHP-DEV] MINIT or RINIT
> > 
> > 
> > 
> > 
> > > -----Original Message-----
> > > From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> > > Sent: 23 April 2002 11:30
> > > To: Sam Liddicott
> > > Cc: PHP Developers Mailing List
> > > Subject: Re: [PHP-DEV] MINIT or RINIT
> > > 
> > > 
> > > Well, where are you storing them?  Make sure they are not in 
> > > memory that
> > > gets cleaned on a per-request basis.  ie. do your own 
> > > malloc() in MINIT
> > > and free() in MSHUTDOWN.
> > 
> > This means my class must be declared as ZEND_INTERNAL_CLASS then?
> > Are there any other side effects to doing this?
> > 
> > Must I un-register my classes during shutdown?  It seems zend 
> > does that for me.
> > 
> > I've made these changes, to use ZEND_INTERNAL_CLASS and 
> > malloc and strdup instead of emalloc and estrdup but now zend 
> > hangs on shutdown.
> > 
> > It seems to come round (under gdb) somewhere in _efree, under 
> > zend_hash_destroy under destroy_zend_class
> > So it sounds like something I did wrong...
> > 
> > Sam
> > 
> 




-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to