From: Robear Selwans Date: Tue, 18 Feb 2020 04:18:03 GMT Subject: [GSoC][RFC][PATCH 0/2] STRBUF_INIT_CONST Cover Message-ID: <20200218041805.10939-1-robear.selwans@outlook.com> This was added according to the issue opened at [https://github.com/gitgitgadget/git/issues/398] [Copied directly from the issue description] > 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(+) -- 2.17.1