clean up RETURN_EDICT and RETURN_STRING definitions to be both easier to read

and more correct for aliasing (and int size dependence, too:).
This commit is contained in:
Bill Currie 2001-02-27 19:05:05 +00:00
parent ea464d5928
commit 7e14a0fbf3
2 changed files with 3 additions and 3 deletions

View file

@ -42,7 +42,7 @@
#include "msg.h"
#include "server.h"
#define RETURN_EDICT(p,e) (((int *)p->pr_globals)[OFS_RETURN] = EDICT_TO_PROG(p, e))
#define RETURN_EDICT(p,e) (p->pr_globals[OFS_RETURN].int_var = EDICT_TO_PROG(p, e))
/*
===============================================================================

View file

@ -40,8 +40,8 @@
#include "world.h"
#include "va.h"
#define RETURN_EDICT(p, e) (((int *)(p)->pr_globals)[OFS_RETURN] = EDICT_TO_PROG(p, e))
#define RETURN_STRING(p, s) (((int *)(p)->pr_globals)[OFS_RETURN] = PR_SetString((p), s))
#define RETURN_EDICT(p, e) ((p)->pr_globals[OFS_RETURN].int_var = EDICT_TO_PROG(p, e))
#define RETURN_STRING(p, s) ((p)->pr_globals[OFS_RETURN].int_var = PR_SetString((p), s))
/*
BUILT-IN FUNCTIONS