Make D_STRING() more useful and add D_GETSTR()

This commit is contained in:
Bill Currie 2011-03-04 21:28:12 +09:00
parent e04f6266b1
commit 7fb22bd1e4

View file

@ -105,7 +105,8 @@ extern struct symtab_s *current_symtab;
#define D_FLOAT(d) D_var (float, d) #define D_FLOAT(d) D_var (float, d)
#define D_INT(d) D_var (integer, d) #define D_INT(d) D_var (integer, d)
#define D_VECTOR(d) D_var (vector, d) #define D_VECTOR(d) D_var (vector, d)
#define D_STRING(d) GETSTR (D_var (string, d)) #define D_STRING(d) D_var (string, d)
#define D_GETSTR(d) GETSTR (D_STRING (d))
#define D_FUNCTION(d) D_var (func, d) #define D_FUNCTION(d) D_var (func, d)
#define D_POINTER(t,d) ((t *)((d)->space->data + (d)->offset)) #define D_POINTER(t,d) ((t *)((d)->space->data + (d)->offset))
#define D_STRUCT(t,d) (*D_POINTER (t, d)) #define D_STRUCT(t,d) (*D_POINTER (t, d))