At 23:44 11.02.2003, Sascha Schumann wrote:
    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
Why then this comment? Did you forgot to remove it.
+/* XXX: Does not handle overflow. */
+#define STR_TO_DEC(str, num) do {                      \


    - 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
Hey cool i just thought about doing that, too.  You're really fast....
Unfortunatley i haven't yet the time to try it out but it looks good.
Does it have any known problems?

marcus


p.s.: I asked about adding the cli manpage some days ago, can you help?


--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to