Skip to content

Commit 4557779

Browse files
calvin-wan-googlegitster
authored andcommitted
strbuf: clarify API boundary
strbuf, as a generic and widely used structure across the codebase, should be limited as a library to only interact with primitives. Add documentation so future functions can appropriately be placed. Older functions that do not follow this boundary should eventually be moved or refactored. Signed-off-by: Calvin Wan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fe86abd commit 4557779

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

strbuf.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
#ifndef STRBUF_H
22
#define STRBUF_H
33

4+
/*
5+
* NOTE FOR STRBUF DEVELOPERS
6+
*
7+
* strbuf is a low-level primitive; as such it should interact only
8+
* with other low-level primitives. Do not introduce new functions
9+
* which interact with higher-level APIs.
10+
*/
11+
412
struct string_list;
513

614
/**

0 commit comments

Comments
 (0)