Skip to content

RFC STRBUF_INIT_CONST Cover

Robear Selwans git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2STRBUF_INIT_CONST: a new way to initialize strbufstrbuf.h+1 -08 replies
2/2STRBUF_INIT_CONST: Adapting strbuf_* functionsstrbuf.c strbuf.h+39 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [GSoC][RFC][PATCH 0/2] STRBUF_INIT_CONST Cover

This was added according to the issue opened at [https://github.com/gitgitgadget/git/issues/398]

[Copied directly from the issue description]

Quoted 5 lines

This new way to initialize an strbuf would set buf to the specified constant string, the appropriate len = strlen(string), and alloc to 0.

That way, we can initialize strbufs with constant values, only allocating memory when/if needed.

Things Done:
- Added a new way to initialize constant strbuf
- Edited functions that try to edit the strbuf to check if it was initialized as a constant

Robear Selwans (2):
STRBUF_INIT_CONST: a new way to initialize strbuf
STRBUF_INIT_CONST: Adapting strbuf_* functions

 strbuf.c | 25 +++++++++++++++++++++++++
 strbuf.h | 15 +++++++++++++++
 2 files changed, 40 insertions(+)
Signature · 1 line
2.17.1