X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fcaseproto.c;h=9837013acb8bee86cb6d30bf0876a706a05dbc71;hb=b8f75b2ac6bc701ecacaa248d630918d7a7346e2;hp=68df141ba9f9638f72914b1822789764ac712d33;hpb=ed0dda01c61c6b086e47f64302b75da5df97db87;p=pspp diff --git a/src/data/caseproto.c b/src/data/caseproto.c index 68df141ba9..9837013acb 100644 --- a/src/data/caseproto.c +++ b/src/data/caseproto.c @@ -59,26 +59,6 @@ caseproto_create (void) return proto; } - -struct caseproto * -caseproto_clone (const struct caseproto *in) -{ - struct caseproto *proto = xmalloc (caseproto_size (in->n_widths)); - proto->ref_cnt = 1; - - proto->n_widths = in->n_widths; - proto->allocated_widths = in->allocated_widths; - - memcpy (proto->widths, in->widths, proto->n_widths * sizeof *proto->widths); - - proto->n_long_strings = in->n_long_strings; - proto->long_strings = NULL; - if ( proto->n_long_strings > 0) - caseproto_refresh_long_string_cache__ (proto); - - return proto; -} - static void do_unref (void *proto_) { @@ -340,7 +320,7 @@ caseproto_free__ (struct caseproto *proto) void caseproto_refresh_long_string_cache__ (const struct caseproto *proto_) { - struct caseproto *proto = (struct caseproto *) proto_; + struct caseproto *proto = CONST_CAST (struct caseproto *, proto_); size_t n, i; assert (proto->long_strings == NULL);