aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-08-04 08:10:35 -0700
committerJunio C Hamano <gitster@pobox.com>2025-08-04 08:10:35 -0700
commit67424f5bcac94ec3b37ac2f76d2c742adaa8e54c (patch)
tree7a2ad2f1d1a5815f4826f2fb77d2290560a35eec
parentMerge branch 'ch/t7450-recursive-clone-test-fix' (diff)
parentCodingGuidelines: clarify that S_release() does not reinitialize (diff)
downloadgit-67424f5bcac94ec3b37ac2f76d2c742adaa8e54c.tar.gz
git-67424f5bcac94ec3b37ac2f76d2c742adaa8e54c.zip
Merge branch 'jc/doc-release-vs-clear'
Doc update. * jc/doc-release-vs-clear: CodingGuidelines: clarify that S_release() does not reinitialize
-rw-r--r--Documentation/CodingGuidelines5
1 files changed, 3 insertions, 2 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index f474120425..224f0978a8 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -624,8 +624,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