aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/CodingGuidelines
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-08-01 10:06:55 -0700
committerJunio C Hamano <gitster@pobox.com>2025-08-01 10:08:17 -0700
commit4ac3302a1a77cf833fc7085a0b6a6b49024d1bc5 (patch)
treed6a78dce0e131c5f1e7def8f5e8ace566f7188e4 /Documentation/CodingGuidelines
parent777489f9e09c8d0dd6b12f9d90de6376330577a2 (diff)
downloadgit-4ac3302a1a77cf833fc7085a0b6a6b49024d1bc5.tar.gz
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>
Diffstat (limited to 'Documentation/CodingGuidelines')
-rw-r--r--Documentation/CodingGuidelines5
1 files changed, 3 insertions, 2 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 3263245b03..ea6b9652e4 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -610,8 +610,9 @@ For C programs:
- `S_init()` initializes a structure without allocating the
structure itself.
- - `S_release()` releases a structure's contents without freeing the
- structure.
+ - `S_release()` releases a structure's contents without reinitializing
+ the structure for immediate reuse, and without freeing the structure
+ itself.
- `S_clear()` is equivalent to `S_release()` followed by `S_init()`
such that the structure is directly usable after clearing it. When