OSSP CVS Repository

ossp - Check-in [1922]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1922
Date: 2002-Feb-28 15:58:07 (local)
2002-Feb-28 14:58:07 (UTC)
User:rse
Branch:
Comment: finish the API change Thomas started
Tickets:
Inspections:
Files:
ossp-pkg/var/var.pod      1.23 -> 1.24     10 inserted, 4 deleted
ossp-pkg/var/var_play.c      1.1 -> 1.2     1 inserted, 1 deleted

ossp-pkg/var/var.pod 1.23 -> 1.24

--- var.pod      2002/02/28 11:40:46     1.23
+++ var.pod      2002/02/28 14:58:07     1.24
@@ -318,15 +318,21 @@
 functions. Such a callback function B<cb> has to be of the following
 prototype:
 
-var_rc_t *B<cb>(void *I<ctx>, const char *I<var_ptr>, size_t
-I<var_len>, int I<var_idx>, const char **I<val_ptr>, size_t *I<val_len>,
-size_t *I<val_size>);
+var_rc_t *B<cb>(var_t *I<var>, void *I<ctx>, const char *I<var_ptr>,
+size_t I<var_len>, int I<var_idx>, const char **I<val_ptr>, size_t
+*I<val_len>, size_t *I<val_size>);
 
 This function will be called by var_expand() internally whenever it has
 to resolve the contents of a variable. Its parameters are:
 
 =over 4
 
+=item var_t *I<var>
+
+This is the passed-through argument as passed to var_expand() as the
+first argument. This can be used in the callback function to distinguish
+the expansion context or to resolve return codes, etc.
+
 =item void *I<ctx>
 
 This is the passed-through argument as passed to var_config() on
@@ -574,7 +580,7 @@
  #include "var.h"
  
  static var_rc_t lookup(
-     void *ctx,
+     var_t *var, void *ctx,
      const char  *var_ptr, size_t  var_len, int     var_idx,
      const char **val_ptr, size_t *val_len, size_t *val_size)
  {


ossp-pkg/var/var_play.c 1.1 -> 1.2

--- var_play.c   2002/02/28 08:08:16     1.1
+++ var_play.c   2002/02/28 14:58:07     1.2
@@ -6,7 +6,7 @@
 #include "var.h"
 
 static var_rc_t lookup(
-    void *ctx,
+    var_t *var, void *ctx,
     const char  *var_ptr, size_t  var_len, int     var_idx,
     const char **val_ptr, size_t *val_len, size_t *val_size)
 {

CVSTrac 2.0.1