> Ah, Ok then. I see i should have made spprintf's interface to support
> an estimated size....but then !! i see the real problem here, i overlooked
> it when rewriting the stuff....yes it is really!! slow....but how about this
> change:

    Have you looked at smart_strs?  That's the way to go, if you
    want to get rid of nasty size calculations/checks and ugly
    memcpy calls.

> +       fprintf(stderr, "Using(%d); '%s'\n", slen, s);\
> +               memcpy(xbuf->nextb, s, slen);   \
> +               xbuf->nextb += slen;            \
> +               cc += slen;                     \
> +               s += slen;                      \

    The API also provides for converting longs to strings. E.g.

        smart_str dest = {0};
        long foo;

        ..
        smart_str_append_long(&dest, foo);

    - Sascha

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to