X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fdictionary.c;h=ca1a286c4d135ad20345fabe11484242bac3d9af;hb=077a1c38bd58911cb74a08f95be3691e49b87779;hp=0dadb959d371d5d0624f4dca21ff5d7c54d0a4ed;hpb=59d14e5581317e3d1e37c8b92b535ba197984776;p=pspp-builds.git diff --git a/src/data/dictionary.c b/src/data/dictionary.c index 0dadb959..ca1a286c 100644 --- a/src/data/dictionary.c +++ b/src/data/dictionary.c @@ -1137,6 +1137,18 @@ dict_create_vector (struct dictionary *d, return false; } +/* Creates in D a vector named NAME that contains the CNT + variables in VAR. A vector named NAME must not already exist + in D. */ +void +dict_create_vector_assert (struct dictionary *d, + const char *name, + struct variable **var, size_t cnt) +{ + assert (dict_lookup_vector (d, name) == NULL); + dict_create_vector (d, name, var, cnt); +} + /* Returns the vector in D with index IDX, which must be less than dict_get_vector_cnt (D). */ const struct vector *