{
dataset_set_session (ds, NULL);
dataset_clear (ds);
- dict_destroy (ds->dict);
+ dict_unref (ds->dict);
caseinit_destroy (ds->caseinit);
trns_chain_destroy (ds->permanent_trns_chain);
dataset_transformations_changed__ (ds, false);
dataset_clear (ds);
- dict_destroy (ds->dict);
+ dict_unref (ds->dict);
ds->dict = dict;
dict_set_change_callback (ds->dict, dict_callback, ds);
}
}
}
-/* Converts all the temporary transformations, if any, to
- permanent transformations. Further transformations will be
- permanent.
+/* Converts all the temporary transformations, if any, to permanent
+ transformations. Further transformations will be permanent.
+
+ The FILTER command is implemented as a temporary transformation, so a
+ procedure that uses this function should usually use proc_open_filtering()
+ with FILTER false, instead of plain proc_open().
+
Returns true if anything changed, false otherwise. */
bool
proc_make_temporary_transformations_permanent (struct dataset *ds)
ds->cur_trns_chain = ds->permanent_trns_chain;
- dict_destroy (ds->permanent_dict);
+ dict_unref (ds->permanent_dict);
ds->permanent_dict = NULL;
return true;
{
if (proc_in_temporary_transformations (ds))
{
- dict_destroy (ds->dict);
+ dict_unref (ds->dict);
ds->dict = ds->permanent_dict;
ds->permanent_dict = NULL;
/* FILTER transformation. */
static int
filter_trns_proc (void *filter_var_,
- struct ccase **c UNUSED, casenumber case_nr UNUSED)
+ struct ccase **c, casenumber case_nr UNUSED)
{
struct variable *filter_var = filter_var_;