better progs access error checking and cleanups resulting from it. Fixes

mega2k and nq.
This commit is contained in:
Bill Currie 2001-03-27 03:57:17 +00:00
parent 5e993575a4
commit f6073d756f
15 changed files with 181 additions and 142 deletions

View file

@ -183,13 +183,7 @@ typedef struct
extern sv_fields_t sv_fields;
#if 1
#define SVFIELD(e,f,t) \
((ED_FindField (&sv_pr_state, #f)->type == ev_##t) \
? E_var (e, sv_fields.f, t) \
: PR_Error (&sv_pr_state, \
"bad type access to %s as %s at %s:%d", \
#f, #t, __FILE__, __LINE__), \
E_var (e, sv_fields.f, t))
#define SVFIELD(e,f,t) E_var (e, PR_AccessField (&sv_pr_state, #f, ev_##t, __FILE__, __LINE__), t)
#else
#define SVFIELD(e,f,t) E_var (e, sv_fields.f, t)
#endif