Stefan de Konink wrote:
>
> I think I cannot sleep if someone doesn't pick this one up.
>
> Could any of the core devs *verify* the correct working of
> cherokee_buffer_add
>
> Shouldn't this end up in the same output?
>
> cherokee_buffer_add(buf, "TEST", sizeof("TEST"));
> cherokee_buffer_add_str(buf, "TEST");
>
> In the first line, the output gets an extra garbage char.
Yes, as Alvaro has explained in a subsequent reply,
it's the zero terminating char.
Anyway, I think that some of cherokee_buffer_* functions
could have a better name and cherokee_buffer_add_str()
is one of these; I would use:
cherokee_buffer_add_mem()
and
cherokee_buffer_add_cstr()
to better explain the kind of arguments they take
(memory pointer + size and literal constant string).
--
Nick Name: A.D.F.
E-Mail-Format: Plain Text only (please); view using font Courier New
--
_______________________________________________
Cherokee mailing list
[email protected]
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee