Re: cvs: php4 /main spprintf.c

From: Date: Tue, 11 Feb 2003 22:44:00 +0000
Subject: Re: cvs: php4 /main spprintf.c
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-94177@lists.php.net to get a copy of this message
Markus, here is a patch against the current CVS which - trims +100 lines of code from spprintf.c - introduces an overflow detection in STR_TO_DEC - eliminates dead code (e.g. assert(foo); if (foo) {..}) - removes unused macros from the original code - simplifies code (e.g. cc was completely dropped) - improves run-time performance The max_len feature is never used in our code base. Nevertheless, cpu cycles were spent on each string operation to check the current length against max_len which is quite inefficient. Thus, I've moved the check to vspprintf where it is applied only once per call. - Sascha

« previous php.dev (#94177) next »