}
static casenumber
-casereader_count_cases__ (struct casereader *reader, casenumber max_cases)
+casereader_count_cases__ (const struct casereader *reader,
+ casenumber max_cases)
{
struct casereader *clone;
casenumber n_cases;
of the contents of a clone of READER. Thus, the return value
is always correct in the absence of I/O errors. */
casenumber
-casereader_count_cases (struct casereader *reader)
+casereader_count_cases (const struct casereader *reader)
{
if (reader->case_cnt == CASENUMBER_MAX)
- reader->case_cnt = casereader_count_cases__ (reader, CASENUMBER_MAX);
+ {
+ struct casereader *reader_rw = CONST_CAST (struct casereader *, reader);
+ reader_rw->case_cnt = casereader_count_cases__ (reader, CASENUMBER_MAX);
+ }
return reader->case_cnt;
}
const struct taint *casereader_get_taint (const struct casereader *);
casenumber casereader_get_case_cnt (struct casereader *);
-casenumber casereader_count_cases (struct casereader *);
+casenumber casereader_count_cases (const struct casereader *);
void casereader_truncate (struct casereader *, casenumber);
const struct caseproto *casereader_get_proto (const struct casereader *);