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 <gitster@pobox.com>
Junio C Hamano committed
Aug 1, 2025 at 10:06 UTC
4ac3302a1a77cf833fc7085a0b6a6b49024d1bc5
1 file changed
+3
-2
Documentation/CodingGuidelines
+3
-2
@@ -610,8 +610,9 @@ For C programs:
610
- `S_init()` initializes a structure without allocating the
611
structure itself.
612
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.
616
617
- `S_clear()` is equivalent to `S_release()` followed by `S_init()`
618
such that the structure is directly usable after clearing it. When