From c088fd44ead8539484e295d2aa9a7143bea8b56a Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 23 Feb 2022 16:25:29 -0800 Subject: [PATCH] Rename section_value to occurrence. --- src/language/stats/ctables.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/language/stats/ctables.c b/src/language/stats/ctables.c index bf3425b49e..05fb957439 100644 --- a/src/language/stats/ctables.c +++ b/src/language/stats/ctables.c @@ -358,7 +358,7 @@ struct ctables_value int leaf; }; -struct ctables_section_value +struct ctables_occurrence { struct hmap_node node; union value value; @@ -2904,15 +2904,15 @@ ctables_add_occurrence (const struct variable *var, int width = var_get_width (var); unsigned int hash = value_hash (value, width, 0); - struct ctables_section_value *sv; - HMAP_FOR_EACH_WITH_HASH (sv, struct ctables_section_value, node, hash, + struct ctables_occurrence *o; + HMAP_FOR_EACH_WITH_HASH (o, struct ctables_occurrence, node, hash, occurrences) - if (value_equal (value, &sv->value, width)) + if (value_equal (value, &o->value, width)) return; - sv = xmalloc (sizeof *sv); - value_clone (&sv->value, value, width); - hmap_insert (occurrences, &sv->node, hash); + o = xmalloc (sizeof *o); + value_clone (&o->value, value, width); + hmap_insert (occurrences, &o->node, hash); } static void @@ -3952,12 +3952,12 @@ ctables_section_recurse_add_empty_categories ( var_get_dict_index (var)]; int width = var_get_width (var); const struct hmap *occurrences = &s->occurrences[a][a_idx]; - const struct ctables_section_value *sv; - HMAP_FOR_EACH (sv, struct ctables_section_value, node, occurrences) + const struct ctables_occurrence *o; + HMAP_FOR_EACH (o, struct ctables_occurrence, node, occurrences) { union value *value = case_data_rw (c, var); value_destroy (value, width); - value_clone (value, &sv->value, width); + value_clone (value, &o->value, width); cats[a][a_idx] = ctables_categories_match (categories, value, var); assert (cats[a][a_idx] != NULL); ctables_section_recurse_add_empty_categories (s, cats, c, a, a_idx + 1); -- 2.30.2