major problem with allocating zval in modules

From: Date: Fri, 02 Jul 1999 15:49:58 +0000
Subject: major problem with allocating zval in modules
Groups: php.version4 
Request: Send a blank email to php-version4+get-1833@lists.php.net to get a copy of this message
hi, the following code is wrong (was correct in php3) zval *hallo = emalloc(sizeof(zval)); array_init(hallo); as emalloc does NOT initialize is_ref and refcount in the zval structure. we should have some more api-functions that take care of this cause adding bla->is_ref = 0; bla->refcount = 1; in every module that creates zvals is painful! and i'm sure we'll forget some. this should be sorted before b1 in my opinion! btw: my last commit fixed all mem-leaks from my testcase (and there was a LOT!). tc 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 (#1833) next »