aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-dedup.c
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2024-10-01 15:34:12 +0100
committerNick Alcock <nick.alcock@oracle.com>2025-02-28 14:47:24 +0000
commitac07bccf05468b089e23765e5be307054712a211 (patch)
treef016e4afd19f9fddd5e27ad8f2487adadcfc5156 /libctf/ctf-dedup.c
parent06cefeee6b12f3bd94a1de400c04ac91dd0b973a (diff)
downloadbinutils-ac07bccf05468b089e23765e5be307054712a211.zip
binutils-ac07bccf05468b089e23765e5be307054712a211.tar.gz
binutils-ac07bccf05468b089e23765e5be307054712a211.tar.bz2
libctf: dedup: describe 'citer'
The distinction between the citer and citers variables in ctf_dedup_rhash_type is somewhat opaque (it's a micro-optimization to avoid having to allocate entire sets when we know in advance that we'll only have to store one value). Add a comment. libctf/ * ctf-dedup.c (ctf_dedup_rhash_type): Comment on citers variables.
Diffstat (limited to 'libctf/ctf-dedup.c')
-rw-r--r--libctf/ctf-dedup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libctf/ctf-dedup.c b/libctf/ctf-dedup.c
index 486b0ef..1e876c8 100644
--- a/libctf/ctf-dedup.c
+++ b/libctf/ctf-dedup.c
@@ -582,6 +582,8 @@ ctf_dedup_rhash_type (ctf_dict_t *fp, ctf_dict_t *input, ctf_dict_t **inputs,
const char *whaterr;
int err = 0;
+ /* "citer" is for types that reference only one other type: "citers" can store
+ many of them, but is more expensive to both populate and traverse. */
const char *citer = NULL;
ctf_dynset_t *citers = NULL;