From a56723cbb6424e1d49289efceeb9c251eed324bb Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Wed, 28 Jul 2010 19:08:43 -0700 Subject: add cstore-specific header file --- src/cli_new.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/cli_new.c') diff --git a/src/cli_new.c b/src/cli_new.c index 9cc9777..a047f36 100644 --- a/src/cli_new.c +++ b/src/cli_new.c @@ -1471,18 +1471,19 @@ static int eval_va(valstruct *res, vtw_node *node) * cstore implementation. * handle is set => we are in cstore operation. */ - clind_val cv; - if (!cstore_get_var_ref(var_ref_handle, pathp, &cv, + vtw_type_e vtype; + char *vptr = NULL; + if (!cstore_get_var_ref(var_ref_handle, pathp, &vtype, &vptr, is_in_delete_action())) { status = -1; } else { /* success */ status = 0; - if(cv.value) { - res->val_type = cv.val_type; + if(vptr) { + res->val_type = vtype; res->val_types = NULL; res->free_me = TRUE; - res->val = cv.value; + res->val = vptr; } } } else { @@ -1648,10 +1649,11 @@ static int expand_string(char *stringp) * cstore implementation. * handle is set => we are in cstore operation. */ - clind_val cv; - if (cstore_get_var_ref(var_ref_handle, scanp, &cv, - is_in_delete_action())) { - cp=cv.value; + vtw_type_e vtype; + char *vptr = NULL; + if (cstore_get_var_ref(var_ref_handle, scanp, &vtype, &vptr, + is_in_delete_action()) && vptr) { + cp = vptr; } } else { /* legacy usage */ -- cgit v1.2.3