Skip to content

Commit 4ac3302

Browse files
committed
CodingGuidelines: clarify that S_release() does not reinitialize
In the section for naming various API functions, the fact that S_release() only releases the resources without preparing the structure for immediate reuse becomes only apparent when you readentries for S_release() and S_clear(). Clarify the description of S_release() a bit to make the entry self sufficient. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 777489f commit 4ac3302

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Documentation/CodingGuidelines

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,9 @@ For C programs:
610610
- `S_init()` initializes a structure without allocating the
611611
structure itself.
612612

613-
- `S_release()` releases a structure's contents without freeing the
614-
structure.
613+
- `S_release()` releases a structure's contents without reinitializing
614+
the structure for immediate reuse, and without freeing the structure
615+
itself.
615616

616617
- `S_clear()` is equivalent to `S_release()` followed by `S_init()`
617618
such that the structure is directly usable after clearing it. When

0 commit comments

Comments
 (0)