pspp-dev
[Top][All Lists]
Advanced

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

[patch #5629] Make "struct variable" opaque: second half


From: John Darrington
Subject: [patch #5629] Make "struct variable" opaque: second half
Date: Sun, 10 Dec 2006 03:31:09 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060607 Debian/1.7.12-1.2

Update of patch #5629 (project pspp):

             Assigned to:                     jmd => blp                    

    _______________________________________________________

Follow-up Comment #1:

I've just a couple of suggestions:

0  In vardict.h, /* Interface between dictionary and variable code. This
header file should only be included by variable.c and
dictionary.c. */ :  You could enforce this with a couple of #defines and a
#error directive.


0 I've never been particularly happy with the aux, aux_dtor and obs_vals
members.  They could be done, with a hash table keyed on the variable's
address.  However, if we're going to keep them how do you feel about making
them 'mutable' members?  That is :

void *
var_attach_aux (const struct variable *v,
                void *aux, void (*aux_dtor) (struct variable *)) 
{
  assert (v->aux == NULL);
  assert (aux != NULL);
  ((struct variable*) v)->aux = aux;
  ((struct variable*) v)->aux_dtor = aux_dtor;
  return aux;
}

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?5629>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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