Make nstr_exec_val() return its first argument
This commit is contained in:
parent
0bcb047806
commit
93a5779e66
3 changed files with 4 additions and 4 deletions
|
@ -277,7 +277,7 @@ extern char *nstr_comp_val(char *, struct valstr*, int);
|
||||||
extern int nstr_coerce_val(struct valstr *, nsc_type, char *);
|
extern int nstr_coerce_val(struct valstr *, nsc_type, char *);
|
||||||
extern int nstr_exec(struct nscstr *, int, void *);
|
extern int nstr_exec(struct nscstr *, int, void *);
|
||||||
/* src/lib/common/nstreval.c */
|
/* src/lib/common/nstreval.c */
|
||||||
extern void nstr_exec_val(struct valstr *, natid, void *, nsc_type);
|
extern struct valstr *nstr_exec_val(struct valstr *, natid, void *, nsc_type);
|
||||||
extern int nstr_promote(int);
|
extern int nstr_promote(int);
|
||||||
extern char *symbol_by_value(int, struct symbol *);
|
extern char *symbol_by_value(int, struct symbol *);
|
||||||
/* src/lib/global/nsc.c */
|
/* src/lib/global/nsc.c */
|
||||||
|
|
|
@ -102,8 +102,7 @@ xdeval(struct valstr *val,
|
||||||
val->val_as.sym.off = off;
|
val->val_as.sym.off = off;
|
||||||
val->val_as.sym.len = len;
|
val->val_as.sym.len = len;
|
||||||
val->val_as.sym.idx = idx;
|
val->val_as.sym.idx = idx;
|
||||||
nstr_exec_val(val, player->cnum, ptr, NSC_NOTYPE);
|
return nstr_exec_val(val, player->cnum, ptr, NSC_NOTYPE);
|
||||||
return val; /* FIXME nstr_exec_val() should return VAL */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
* WANT. VAL must be coercible. That's the case if a previous
|
* WANT. VAL must be coercible. That's the case if a previous
|
||||||
* nstr_coerce_val(VAL, WANT, STR) succeeded.
|
* nstr_coerce_val(VAL, WANT, STR) succeeded.
|
||||||
*/
|
*/
|
||||||
void
|
struct valstr *
|
||||||
nstr_exec_val(struct valstr *val, natid cnum, void *ptr, nsc_type want)
|
nstr_exec_val(struct valstr *val, natid cnum, void *ptr, nsc_type want)
|
||||||
{
|
{
|
||||||
char *memb_ptr;
|
char *memb_ptr;
|
||||||
|
@ -158,6 +158,7 @@ nstr_exec_val(struct valstr *val, natid cnum, void *ptr, nsc_type want)
|
||||||
}
|
}
|
||||||
|
|
||||||
val->val_type = valtype;
|
val->val_type = valtype;
|
||||||
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue