Re: [PHP4BETA] ts_allocate_id and start_memory_manager problem.

From: Date: Wed, 01 Sep 1999 07:03:32 +0000
Subject: Re: [PHP4BETA] ts_allocate_id and start_memory_manager problem.
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-3944@lists.php.net to get a copy of this message
On Tue, 31 Aug 1999, Zeev Suraski wrote: > At 18:13 31/08/99 , Thies C. Arntzen wrote: > >hi andi, zeev, > > > >problem is: > >ts_allocate_id calls alloc_globals_ctor -> start_memory_manager -> > >start_memory_manager -> ALS_FETCH() > >*but* as ts_allocate_id hasn't returned a valid resource yet (still in the > >call) ALS_FETCH() will fetch the 1st allocated resource into > >alloc_globals. (bad idea). > > Hmmm good call. I'll look into fixing it tomorrow. > > >please let resources start with 1 instead of 0 - that would make debugging > >so much easier! > > It's not that simple, which is why I haven't gotten around to doing it. I > hope to do it by the weekend. just adding one before returning it should do (and then of course substract on in get_resource etc;-) that way TSRM could barf loud when somebody asks for resource 0 (which - in the current implemetation - could be good or bad) tc > > Zeev > -- > Zeev Suraski <zeev@zend.com> http://www.zend.com/ > For a PGP public key, finger bourbon@netvision.net.il > > Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" Digital Collections Phone +49 40 235350 Fax +49 40 23535180 Hammerbrookstr. 93 20097 Hamburg / Germany

« previous php.version4 (#3944) next »