payload.create = create_n;
payload.update = update_n;
payload.calculate = calculate_n;
+ payload.destroy = NULL;
cmd->wv = dict_get_weight (cmd->dict);
+
/* PSPP - a program for statistical analysis.
Copyright (C) 2011, 2012 Free Software Foundation, Inc.
payload.create = create_n;
payload.update = update_n;
payload.calculate = calculate_n;
+ payload.destroy = NULL;
for (t = 0; t < cmd->n_tables; ++t)
{
return dd;
}
+static void
+killit (const void *aux1 UNUSED, void *user_data)
+{
+ struct descriptive_data *dd = user_data;
+
+ dd_destroy (dd);
+}
+
+
static void
updateit (const void *aux1, void *aux2, void *user_data,
const struct ccase *c, double weight)
payload.create = makeit;
payload.update = updateit;
payload.calculate = NULL;
+ payload.destroy = killit;
ws.vws[v].cat = categoricals_create (&inter, 1, cmd->wv,
cmd->exclude, cmd->exclude);
/* Interate over each interaction value, and unref any cases that we reffed */
HMAP_FOR_EACH (iv, struct interaction_value, node, &cat->iap[i].ivmap)
{
-#if 0
- if (cat->payload)
+ if (cat->payload && cat->payload->destroy)
cat->payload->destroy (cat->aux1, iv->user_data);
-#endif
case_unref (iv->ccase);
}
void* (*create) (const void *aux1, void *aux2);
void (*update) (const void *aux1, void *aux2, void *user_data, const struct ccase *, double weight);
void (*calculate) (const void *aux1, void *aux2, void *user_data);
+ void (*destroy) (const void *aux1, void *user_data);
};