John Darrington <[EMAIL PROTECTED]> writes: > The following confuses me: > > /* Executes the given CHAIN of transformations on C, > passing *CASE_NR as the case number. > If a transformation modifies *CASE_NR, it will affect the case > number passed to following transformations. > ... */ > enum trns_result > trns_chain_execute (struct trns_chain *chain, enum trns_result start, > struct ccase *c, const size_t *case_nr) > > How can *case_nr be modified if it's const ?
case_nr is const because trns_chain_execute never modifies it, and neither does anything that obtains it through trns_chain_execute. However, a transformation that has obtained a non-const pointer to case_nr through another means may modify it. The only transformation that does that (if I recall correctly) is END CASE, in end_case_trns_proc. This is a rather exceptional condition. -- Ben Pfaff http://benpfaff.org _______________________________________________ pspp-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/pspp-dev
