|
Re: [patch #5690] Clean up case code: msg#00073statistics.pspp.devel
On Mon, Jan 15, 2007 at 07:08:47PM +0000, Ben Pfaff wrote: URL: <http://savannah.gnu.org/patch/?5690> Summary: Clean up case code Project: PSPP Submitted by: blp Submitted on: Monday 01/15/07 at 11:08 Details: This cleans up and improves case.[ch] and fixes some bugs found in the process. This has provided a sharp reminder about a rather nasty kludge that exists in the GUI code ... now that case_clone unshares its data when DEBUGGING is enabled, a gui built with this option is getting junk in its data sheet. The basic problem is that data/case.[ch] is designed such that it forbids writing to case data which is contained by an existing casefile. For the GUI to work the way that GUIs are supposed to, it needs to do exactly that. Currently the code achieves this by calling case_data(), casting away the const on the return value and performing an illicit write on the value concerned. Now, I can't get away with such a trick, at least not if DEBUGGING is turned on. I can see two alternative ways to overcome this, but neither are particularly nice: 1. Copy the case locally, write to it, and replace it into the flexifile. This wouldn't be very efficient if we're dealing with very large cases. 2. Introduce some kind of special case for use in flexifiles which allows writing. I'm leaning towards 1, because it'd be easier to implement, and this operation wouldn't need to happen fast. Any better ideas? J' -- PGP Public key ID: 1024D/2DE827B3 fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://pgp.mit.edu or any PGP keyserver for public key.
pspp-dev mailing list pspp-dev@xxxxxxx http://lists.gnu.org/mailman/listinfo/pspp-dev |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [patch #5709] Augmented Balanced Tree data structure: 00073, Ben Pfaff |
|---|---|
| Next by Date: | Re: [patch #5690] Clean up case code: 00073, Ben Pfaff |
| Previous by Thread: | [patch #5690] Clean up case codei: 00073, Ben Pfaff |
| Next by Thread: | Re: [patch #5690] Clean up case code: 00073, Ben Pfaff |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |