Pass struct natstr * instead of natid to virtual selectors

This is because we want to define them in src/lib/global/, and code
there can't use getnatp(), because that requires
src/lib/common/file.c.  Which renders a cnum parameter pretty useless.

Virtual selectors requiring code from common/ could well come up again
in the future, but let's not worry about that now.
This commit is contained in:
Markus Armbruster 2008-03-25 21:36:52 +01:00
parent 44295e43af
commit e5ef3d4840
3 changed files with 39 additions and 38 deletions

View file

@ -87,8 +87,9 @@ nstr_exec_val(struct valstr *val, natid cnum, void *ptr, enum nsc_type want)
break;
case NSC_OFF:
if (val->val_as.sym.get) {
natp = getnatp(cnum);
do {
ptr = val->val_as.sym.get(val, cnum, ptr);
ptr = val->val_as.sym.get(val, natp, ptr);
} while (ptr && val->val_as.sym.get);
if (!ptr) {
valtype = val->val_type;