John Darrington <[EMAIL PROTECTED]> writes:

> On Thu, Dec 14, 2006 at 05:44:00PM +0000, Ben Pfaff wrote:
>
>      Is there good reason that struct dictionary stores the callbacks by-value
>      instead of by-pointer?  I'd normally expect the callbacks structures to 
> be
>      static and const...
>
> struct dictionary actually contains a (struct callbacks) which in turn
> contains pointers to each of the callbacks.  I did it this way,
> because I originally intented the callbacks to be passed to
> dictionary's constructor, and it saved having an unmanageable number
> of arguments in the constructor.   But I've since decided that it's
> better to set the callbacks post construction, so (struct callbacks)
> is probably no longer necessary.  It's probably best to have a
> dict_set_callback_* function for each callback.

I really just meant why there's a "struct callback" in struct
dictionary instead of a "const struct callback *".  Not a big
deal either way.

>      I noticed this comment:
>         /* Kludge: Happily GtkJustification is defined similarly
>            to enum alignment from pspp/variable.h */
>      Perhaps this comment should be on enum var_alignment, to
>         discourage me from changing it, or perhaps we should add a
>         real conversion here. 
>
> If you did change it, it would mess up reading and writing of
> system files, because the same coding is used by the sys file format.

Perhaps it should be fixed in both places.
-- 
Ben Pfaff 
email: [EMAIL PROTECTED]
web: http://benpfaff.org


_______________________________________________
pspp-dev mailing list
pspp-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/pspp-dev

Reply via email to