X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fdictionary.c;h=2d99f6d72cfe2a7e6dc442102f16a4dc687cbe32;hb=c3d6b68809037b48ff51dd693a0c8e75bcc30d7a;hp=c8f58516ecc79d1d6a7bc78a29353f838745634c;hpb=d9fc15ceb74cdc66487ba9aaed04246170729640;p=pspp-builds.git diff --git a/src/data/dictionary.c b/src/data/dictionary.c index c8f58516..2d99f6d7 100644 --- a/src/data/dictionary.c +++ b/src/data/dictionary.c @@ -87,6 +87,8 @@ struct dictionary static void dict_unset_split_var (struct dictionary *, struct variable *); static void dict_unset_mrset_var (struct dictionary *, struct variable *); +/* Returns the encoding for data in dictionary D. The return value is a + nonnull string that contains an IANA character set name. */ const char * dict_get_encoding (const struct dictionary *d) { @@ -181,7 +183,9 @@ dict_create (const char *encoding) dictionary. If the new dictionary won't be used to access cases produced with the old dictionary, then the new dictionary's case indexes should be compacted with - dict_compact_values to save space. */ + dict_compact_values to save space. + + Callbacks are not cloned. */ struct dictionary * dict_clone (const struct dictionary *s) { @@ -192,8 +196,7 @@ dict_clone (const struct dictionary *s) /* Set the new dictionary's encoding early so that string length limitations are interpreted correctly. */ - if ( s->encoding) - d->encoding = xstrdup (s->encoding); + d->encoding = xstrdup (s->encoding); for (i = 0; i < s->var_cnt; i++) {