Re: [PHP-CVS] cvs: php4 /ext/midgard midgard.c

2001-02-25 Thread Andi Gutmans
Are you sure you shouldn't be using zval_ptr_dtor(args[0]) as opposed to zval_dtor(). I see you guys doing this a lot and usually you'd want to use zval_ptr_dtor(). It reduces reference count and only if the zval really needs freeing does it run zval_dtor() and efree(). In any case, you guys s

Re: [PHP-CVS] cvs: php4 /ext/midgard midgard.c

2001-02-22 Thread Thies C. Arntzen
On Thu, Feb 22, 2001 at 01:38:36PM +0200, Andi Gutmans wrote: > Because thread-wide globals are only available when you're actually in the > thread (during a request) and not when the process starts up. If you need > true globals you can just use globals. sorry - you're right (and i'm stpid

Re: [PHP-CVS] cvs: php4 /ext/midgard midgard.c

2001-02-22 Thread Andi Gutmans
Yes. It will call your init_globals just in time, usually on your first access to the data if I remember correctly. Your fix is correct. I didn't see it when I sent that Email. Andi At 12:37 PM 2/22/2001 +0100, Emiliano wrote: >Andi Gutmans wrote: > > > > You only have the module globals durin

Re: [PHP-CVS] cvs: php4 /ext/midgard midgard.c

2001-02-22 Thread Andi Gutmans
Because thread-wide globals are only available when you're actually in the thread (during a request) and not when the process starts up. If you need true globals you can just use globals. Andi At 12:34 PM 2/22/2001 +0100, Thies C. Arntzen wrote: >On Thu, Feb 22, 2001 at 01:26:45PM +0200, Andi

Re: [PHP-CVS] cvs: php4 /ext/midgard midgard.c

2001-02-22 Thread Emiliano
Andi Gutmans wrote: > > You only have the module globals during requests (rinit/rshutdown). You > can't access them in module init/module shutdown. Yeah, I realized that moments later and removed it. But ZEND_INIT_MODULE_GLOBALS will call the init_globals function before the request starts, rig

Re: [PHP-CVS] cvs: php4 /ext/midgard midgard.c

2001-02-22 Thread Thies C. Arntzen
On Thu, Feb 22, 2001 at 01:26:45PM +0200, Andi Gutmans wrote: > You only have the module globals during requests (rinit/rshutdown). You > can't access them in module init/module shutdown. could you explain why? ok the the midgard PHP_MINIT_FUNCTION does not allocate a tsrm_id for the mod

Re: [PHP-CVS] cvs: php4 /ext/midgard midgard.c

2001-02-22 Thread Andi Gutmans
You only have the module globals during requests (rinit/rshutdown). You can't access them in module init/module shutdown. Andi At 11:35 PM 2/20/2001 +, Emiliano Heyns wrote: >emile Tue Feb 20 15:35:35 2001 EDT > > Modified files: > /php4/ext/midgard midgard.c > Log: >