patchPSPP - Patches: patch #5629, Make "struct variable"...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitter:  Ben Pfaff <blp>
Submitted:  Sun 10 Dec 2006 02:55:21 AM UTC
   
 
Category:  None Item Group:  None
Status:  Done Assigned to:  jmd
Open/Closed:  Closed

Sun 10 Dec 2006 03:31:56 AM UTC, comment #2: 

Updated patch:

  • variable.h: (enum NUMERIC) Rename VAR_NUMERIC, update all users.

(enum ALPHA) Rename VAR_STRING, update all users.


(file #11498)

Ben Pfaff <blp>
Group administrator
Sun 10 Dec 2006 03:31:08 AM UTC, comment #1: 

I've just a couple of suggestions:

  1.  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.


  1. 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;
}

John Darrington <jmd>
Group administrator
Sun 10 Dec 2006 02:55:21 AM UTC, original submission:  

Finish converting struct variable to an opaque type.  In this
phase, we add remaining setter and getter functions, convert the
remaining PSPP code to use them, and do a bunch of cleanup.  The
resulting changes are pervasive but mostly trivial, and only the
notable changes are logged.

Ben Pfaff <blp>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #11498:  opaque-var-2.patch added by blp (243KiB - text/x-patch - new patch)
file #11496:  opaque-var.patch added by blp (224KiB - text/x-patch - patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jmd (Posted a comment)
  • -email is unavailable- added by blp (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2006-12-10 blp StatusNone Done
        Open/ClosedOpen Closed
    2006-12-10 blp Attached File- Added opaque-var-2.patch, #11498
        Assigned toblp jmd
    2006-12-10 jmd Assigned tojmd blp
    2006-12-10 blp Attached File- Added opaque-var.patch, #11496

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code