[Top][All Lists]

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

Re: [patch #5636] Add callback feature to dictionary

From: Ben Pfaff
Subject: Re: [patch #5636] Add callback feature to dictionary
Date: Thu, 14 Dec 2006 15:29:38 -0800
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

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

reply via email to

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