[Mesa-dev] [PATCH] glcpp: Rewrite line-continuation support to act globally.
Carl Worth
cworth at cworth.org
Fri Nov 30 15:20:50 PST 2012
Kenneth Graunke <kenneth at whitecape.org> writes:
> Other than than, looks good to me...thanks Carl!
>
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Thanks, Ken. Pushed now.
> Someday we may want to use ralloc's rewrite_tail functions to avoid the
> extra strlen() overhead. But that can be done separately.
I took a look at this now. It looks like there are only rewrite_tail
variants of ralloc_asprintf, which feel heavy here. I'd prefer a variant
of ralloc_strcat that would give the better efficiency, (and the
documentation of ralloc_strcat could then point to the alternate
function).
Perhaps the new function could be named ralloc_rewrite_tail? Compared to
something like ralloc_strcat_rewrite_tail that would be a less awkward
name, and would also avoid suggesting that the new string is always
appended to the end, (in the case where the passed length is shorter
than the current string's length).
The only naming question left after that would be what to name the
tail-rewriting variant of ralloc_strncat?
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121130/4f01f3f0/attachment.pgp>
More information about the mesa-dev
mailing list