John Darrington <[EMAIL PROTECTED]> writes:

> Doesn't this mean that casereaders need to be reference counted?  I
> keep getting seg faults which turn out to be due to datasheet.c
> referencing casereaders which have been destroyed.

There's a missing comment on datasheet_create.  Here's a fix.
Does it clarify the issue?

--- datasheet.c.~1.4.~  2007-06-10 10:02:23.000000000 -0700
+++ datasheet.c 2007-06-11 20:14:21.000000000 -0700
@@ -150,7 +150,8 @@ static bool rw_case (struct datasheet *d
 /* Creates and returns a new datasheet.
 
    If READER is nonnull, then the datasheet initially contains
-   the contents of READER. */
+   the contents of READER.  READER become owned by the datasheet
+   and the caller must not directly reference it again. */
 struct datasheet *
 datasheet_create (struct casereader *reader)
 {


-- 
Ben Pfaff 
http://benpfaff.org


_______________________________________________
pspp-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-dev

Reply via email to