/[pspp]/pspp/src/vars-atr.c
ViewVC logotype

Diff of /pspp/src/vars-atr.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20 by jmd, Fri Apr 29 01:02:16 2005 UTC revision 1.21 by blp, Fri Apr 29 21:32:18 2005 UTC
# Line 36  Line 36 
36    
37  #include "debug-print.h"  #include "debug-print.h"
38    
39    /* Assign auxiliary data AUX to variable V, which must not
40       already have auxiliary data.  Before V's auxiliary data is
41       cleared, AUX_DTOR(V) will be called. */
42  void *  void *
43  var_attach_aux (struct variable *v,  var_attach_aux (struct variable *v,
44                  void *aux, void (*aux_dtor) (struct variable *))                  void *aux, void (*aux_dtor) (struct variable *))
# Line 47  var_attach_aux (struct variable *v, Line 50  var_attach_aux (struct variable *v,
50    return aux;    return aux;
51  }  }
52    
53    /* Remove auxiliary data, if any, from V, and returns it, without
54       calling any associated destructor. */
55  void *  void *
56  var_detach_aux (struct variable *v)  var_detach_aux (struct variable *v)
57  {  {
# Line 56  var_detach_aux (struct variable *v) Line 61  var_detach_aux (struct variable *v)
61    return aux;    return aux;
62  }  }
63    
64    /* Clears auxiliary data, if any, from V, and calls any
65       associated destructor. */
66  void  void
67  var_clear_aux (struct variable *v)  var_clear_aux (struct variable *v)
68  {  {
# Line 68  var_clear_aux (struct variable *v) Line 75  var_clear_aux (struct variable *v)
75      }      }
76  }  }
77    
78    /* This function is appropriate for use an auxiliary data
79       destructor (passed as AUX_DTOR to var_attach_aux()) for the
80       case where the auxiliary data should be passed to free(). */
81  void  void
82  var_dtor_free (struct variable *v)  var_dtor_free (struct variable *v)
83  {  {

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26