]> git.ipfire.org Git - thirdparty/git.git/commitdiff
CodingGuidelines: clarify that S_release() does not reinitialize
authorJunio C Hamano <gitster@pobox.com>
Fri, 1 Aug 2025 17:06:55 +0000 (10:06 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 1 Aug 2025 17:08:17 +0000 (10:08 -0700)
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>
Documentation/CodingGuidelines

index 3263245b0323705586b26d488e805ac0414dca44..ea6b9652e43ea717ffd4e860dbfde5ffdf382d92 100644 (file)
@@ -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