[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Datasheet internals

From: Ben Pfaff
Subject: Re: Datasheet internals
Date: Mon, 11 Jun 2007 20:14:59 -0700
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

John Darrington <address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]