X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Flazy-casereader.c;h=65d10aea2477640a826077a7da01c17f78fbf665;hb=ef35211c05259417e4f3dd4a7de44e92e4bc54a3;hp=71c1da6a64595cca06d48480bd03f3a4b8ea12d4;hpb=2bdde1cd21cd58349cf4bd852fddf40524854288;p=pspp diff --git a/src/data/lazy-casereader.c b/src/data/lazy-casereader.c index 71c1da6a64..65d10aea24 100644 --- a/src/data/lazy-casereader.c +++ b/src/data/lazy-casereader.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -35,7 +35,7 @@ struct lazy_casereader void *aux; }; -static struct casereader_class lazy_casereader_class; +static const struct casereader_class lazy_casereader_class; /* Creates and returns a new lazy casereader that will instantiate its underlying casereader, if necessary, by @@ -76,7 +76,7 @@ lazy_casereader_create (size_t value_cnt, casenumber case_cnt, a serial number different from SERIAL, or if READER is a lazy casereader that was instantiated. - When this function returns false, it necessarily indicates + When this function returns true, it necessarily indicates that the lazy casereader was never cloned and never destroyed. */ bool @@ -117,13 +117,12 @@ instantiate_lazy_casereader (struct casereader *reader, casereader_destroy (subreader); } -static bool -lazy_casereader_read (struct casereader *reader, void *lc_, - struct ccase *c) +static struct ccase * +lazy_casereader_read (struct casereader *reader, void *lc_) { struct lazy_casereader *lc = lc_; instantiate_lazy_casereader (reader, lc); - return casereader_read (reader, c); + return casereader_read (reader); } static void @@ -143,16 +142,15 @@ lazy_casereader_clone (struct casereader *reader, void *lc_) return casereader_clone (reader); } -static bool -lazy_casereader_peek (struct casereader *reader, void *lc_, - casenumber idx, struct ccase *c) +static struct ccase * +lazy_casereader_peek (struct casereader *reader, void *lc_, casenumber idx) { struct lazy_casereader *lc = lc_; instantiate_lazy_casereader (reader, lc); - return casereader_peek (reader, idx, c); + return casereader_peek (reader, idx); } -static struct casereader_class lazy_casereader_class = +static const struct casereader_class lazy_casereader_class = { lazy_casereader_read, lazy_casereader_do_destroy,