server/src/util/variant.h

26 lines
405 B
C
Raw Normal View History

2010-08-08 10:06:34 +02:00
#ifndef STRUCT_VARIANT_H
#define STRUCT_VARIANT_H
#ifdef __cplusplus
extern "C" {
#endif
2011-03-07 08:02:35 +01:00
typedef union variant {
void *v;
int i;
char c;
short s;
short sa[2];
char ca[4];
float f;
} variant;
2010-08-08 10:06:34 +02:00
2011-03-07 08:02:35 +01:00
typedef enum variant_type {
VAR_NONE, VAR_INT, VAR_VOIDPTR, VAR_CHAR, VAR_SHORT, VAR_SHORTA, VAR_CHARA,
VAR_FLOAT
} variant_type;
2010-08-08 10:06:34 +02:00
#ifdef __cplusplus
}
#endif
#endif