RE: [PHP-DEV] MINIT or RINIT

From: Date: Tue, 23 Apr 2002 13:37:11 +0000
Subject: RE: [PHP-DEV] MINIT or RINIT
Groups: php.dev 
Request: Send a blank email to php-dev+get-83210@lists.php.net to get a copy of this message
> -----Original Message----- > From: Rasmus Lerdorf [mailto:rasmus@lerdorf.ca] > 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. Stupid questions follow: So... does my zend_class_entry have to be wrapped in CG()? Right now swig generates lines like: CG(class_entry).type=... Can I just do: zend_class_entry _swig_wrap_XXXX; _swig_wrap_XXXXX.type=... And it also currently does: CG(class_entry).refcount=(int *)emalloc(sizerof(int)); *CG(class_entry).refcount=1; I have no idea why it does this; do we need to init refcount? To anything simpler? Thanks Sam > > -Rasmus > > On Tue, 23 Apr 2002, Sam Liddicott wrote: > > > Swig generated code registers some overloaded classes to > wrap C classes. > > > > I think it should do this in PHP_MINIT but when I do it > here they are only > > available as registered for the first apache request. > > > > If I register them in PHP_RINIT then they are always available. > > > > Why would this be so? Which should I use? > > > > Sam > > > > > > > > > > -- > > PHP Development Mailing List <http://www.php.net/> > > To unsubscribe, visit: http://www.php.net/unsub.php > > >

« previous php.dev (#83210) next »