OSSP CVS Repository

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

Check-in Number: 1918
Date: 2002-Feb-28 13:40:01 (local)
2002-Feb-28 12:40:01 (UTC)
User:thl
Branch:
Comment: prepare for API finally passing "val_t *" to callback, currently pass NULL
Tickets:
Inspections:
Files:
ossp-pkg/var/var.c      1.68 -> 1.69     4 inserted, 4 deleted
ossp-pkg/var/var.h      1.25 -> 1.26     1 inserted, 1 deleted
ossp-pkg/var/var_test.c      1.36 -> 1.37     1 inserted, 1 deleted

ossp-pkg/var/var.c 1.68 -> 1.69

--- var.c        2002/02/28 12:10:33     1.68
+++ var.c        2002/02/28 12:40:01     1.69
@@ -712,7 +712,7 @@
         result->buffer_size = 0;
     }
     else {
-        rc = (*lookup) (lookup_context, name.begin, name.end - name.begin, idx,
+        rc = (*lookup) (NULL, lookup_context, name.begin, name.end - name.begin, idx,
                         &data, &len, &buffer_size);
         if (rc == VAR_ERR_UNDEFINED_VARIABLE) {
             /* The variable is undefined. What we'll do now depends on the
@@ -817,7 +817,7 @@
     if (rc < 0)
         return rc;
     if (rc > 0) {
-        rc2 = (*lookup)(lookup_context, p, rc, 0, &data, &len, &buffer_size);
+        rc2 = (*lookup)(NULL, lookup_context, p, rc, 0, &data, &len, &buffer_size);
         if (rc2 == VAR_ERR_UNDEFINED_VARIABLE && !force_expand) {
             result->begin = begin;
             result->end = begin + 1 + rc;
@@ -1706,7 +1706,7 @@
     int     *rel_lookup_flag;
 };
 
-static int lookup_wrapper(void *context,
+static int lookup_wrapper(var_t *var, void *context,
                           const char *name, size_t name_len, int idx,
                           const char **data, size_t *data_len,
                           size_t *buffer_size)
@@ -1715,7 +1715,7 @@
     struct wrapper_context *wcon = context;
     int rc;
 
-    rc = (*wcon->lookup)(wcon->context, name, name_len,
+    rc = (*wcon->lookup)(NULL, wcon->context, name, name_len,
                          idx, data, data_len, buffer_size);
     if (rc == VAR_ERR_UNDEFINED_VARIABLE) {
         (*wcon->rel_lookup_flag)--;


ossp-pkg/var/var.h 1.25 -> 1.26

--- var.h        2002/02/28 08:48:44     1.25
+++ var.h        2002/02/28 12:40:01     1.26
@@ -100,7 +100,7 @@
 } var_syntax_t;
 
 typedef var_rc_t (*var_cb_value_t)(
-    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_test.c 1.36 -> 1.37

--- var_test.c   2002/02/28 09:29:48     1.36
+++ var_test.c   2002/02/28 12:40:01     1.37
@@ -40,7 +40,7 @@
 };
 
 static var_rc_t var_lookup(
-    void *context,
+    var_t *var, void *context,
     const char *varname, size_t name_len, int idx,
     const char **data, size_t *data_len,
     size_t *buffer_size)

CVSTrac 2.0.1