Thread (10 messages) flat view 10 messages, 2 authors, 2021-09-21

Re: [PATCH 2/2] grep: mark "haystack" buffers as const

From: Jeff King <hidden>
Date: 2021-09-21 02:22:00

On Mon, Sep 20, 2021 at 09:43:26PM -0400, Jeff King wrote:
When we're grepping in a buffer, we don't need to modify it. So we can
take "const char *" buffers, rather than "char *". This can avoid some
awkward casts in our callers.
Sorry, this patch should have touched strip_timestamp(), too. I had
originally done it in the earlier patch, but because we pass a
pointer-to-pointer, the compiler got mad about the mis-matched type from
the caller. So I reverted it there, but forgot to add it back in here.

At any rate, these are mostly for illustration. They'd need a little
rebasing if not put on top of your patches anyway.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help