pike.git/
src/
svalue.h
Branch:
Tag:
Non-build tags
All tags
No tags
2012-07-22
2012-07-22 22:18:32 by Bill Welliver <bill@welliver.org>
5d5f7e398bf30fb825de24a4486f099ca28d1cbc (
14
lines) (+
9
/-
5
)
[
Show
|
Annotate
]
Branch:
7.9
Build: MSVC didn't like the variable name in the SET_SVAL macro, probably
due to a clash.
103:
#define SUBTYPEOF(SVAL) ((SVAL).subtype) #define SET_SVAL_TYPE(SVAL, TYPE) (TYPEOF(SVAL) = (TYPE)) #define SET_SVAL_SUBTYPE(SVAL, TYPE) (SUBTYPEOF(SVAL) = (TYPE))
-
#define SET_SVAL(SVAL, TYPE, SUBTYPE, FIELD, EXPR) do { \
+
#define SET_SVAL(SVAL, TYPE, SUBTYPE, FIELD, EXPR) do { \
/* Set the type afterwards to avoid a clobbered \ * svalue in case EXPR throws. */ \
-
struct svalue *__
sptr
= &(SVAL); \
-
__
sptr
->u.FIELD = (EXPR);
\
-
SET_SVAL_TYPE(*__
sptr
, (TYPE));
\
-
SET_SVAL_SUBTYPE(*__
sptr
, (SUBTYPE));
\
+
struct svalue *
__
sv_ptr
= &(
SVAL
);
\
+
__
sv_ptr
->u.FIELD = (EXPR); \
+
SET_SVAL_TYPE(*__
sv_ptr
, (TYPE)); \
+
SET_SVAL_SUBTYPE(*__
sv_ptr
, (SUBTYPE)); \
} while(0)
-
+
+
/*
+
*/
#define INVALIDATE_SVAL(SVAL) SET_SVAL_TYPE(SVAL, 99) /* an invalid type */ #define PIKE_T_ARRAY 0