[Top][All Lists]

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

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

From: John Darrington
Subject: Re: [patch #5636] Add callback feature to dictionary
Date: Fri, 15 Dec 2006 08:20:22 +0900
User-agent: Mutt/1.5.9i

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'm beginning to think we should just drop the "Written by
     <so-and-so>" lines 
     at the top of each source file.  PSPP is a collaborative work now
     and most files have been touched by more than one person.  What
     do you think? 

I agree.  We have ChangeLog files, and we have the CVS history.  So
this line is redundant. 
     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.


PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature

reply via email to

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