projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update widgets.c from psppsheet branch
[pspp]
/
src
/
data
/
dictionary.c
diff --git
a/src/data/dictionary.c
b/src/data/dictionary.c
index b64d84a2ca58622eb06c99ede072579b71d476ed..5731d78695148ad14e199d51ea0431109769f65e 100644
(file)
--- a/
src/data/dictionary.c
+++ b/
src/data/dictionary.c
@@
-194,10
+194,6
@@
dict_clone (const struct dictionary *s)
d = dict_create (s->encoding);
d = dict_create (s->encoding);
- /* Set the new dictionary's encoding early so that string length limitations
- are interpreted correctly. */
- d->encoding = xstrdup (s->encoding);
-
for (i = 0; i < s->var_cnt; i++)
{
struct variable *sv = s->var[i].var;
for (i = 0; i < s->var_cnt; i++)
{
struct variable *sv = s->var[i].var;
@@
-305,6
+301,7
@@
dict_destroy (struct dictionary *d)
d->callbacks = NULL ;
dict_clear (d);
d->callbacks = NULL ;
dict_clear (d);
+ string_array_destroy (&d->documents);
hmap_destroy (&d->name_map);
attrset_destroy (&d->attributes);
dict_clear_mrsets (d);
hmap_destroy (&d->name_map);
attrset_destroy (&d->attributes);
dict_clear_mrsets (d);
@@
-600,7
+597,6
@@
dict_delete_var (struct dictionary *d, struct variable *v)
{
int dict_index = var_get_dict_index (v);
const int case_index = var_get_case_index (v);
{
int dict_index = var_get_dict_index (v);
const int case_index = var_get_case_index (v);
- const int width = var_get_width (v);
assert (dict_contains_var (d, v));
assert (dict_contains_var (d, v));
@@
-628,13
+624,14
@@
dict_delete_var (struct dictionary *d, struct variable *v)
/* Free memory. */
var_clear_vardict (v);
/* Free memory. */
var_clear_vardict (v);
- var_destroy (v);
if ( d->changed ) d->changed (d, d->changed_data);
invalidate_proto (d);
if (d->callbacks && d->callbacks->var_deleted )
if ( d->changed ) d->changed (d, d->changed_data);
invalidate_proto (d);
if (d->callbacks && d->callbacks->var_deleted )
- d->callbacks->var_deleted (d, dict_index, case_index, width, d->cb_data);
+ d->callbacks->var_deleted (d, v, dict_index, case_index, d->cb_data);
+
+ var_destroy (v);
}
/* Deletes the COUNT variables listed in VARS from D. This is
}
/* Deletes the COUNT variables listed in VARS from D. This is