* WANT. VAL must be coercible. That's the case if a previous
* nstr_coerce_val(VAL, WANT, STR) succeeded.
*/
-void
+struct valstr *
nstr_exec_val(struct valstr *val, natid cnum, void *ptr, nsc_type want)
{
char *memb_ptr;
valtype = val->val_type;
break;
case NSC_OFF:
+ if (val->val_as.sym.get) {
+ do {
+ ptr = val->val_as.sym.get(val, cnum, ptr);
+ } while (ptr && val->val_as.sym.get);
+ if (!ptr) {
+ valtype = val->val_type;
+ val->val_cat = NSC_VAL;
+ break;
+ }
+ }
+
valtype = NSC_LONG;
memb_ptr = ptr;
memb_ptr += val->val_as.sym.off;
}
val->val_type = valtype;
+ return val;
}
/*