summaryrefslogtreecommitdiff
path: root/src/honeysuckle.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/honeysuckle.h')
-rw-r--r--src/honeysuckle.h30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/honeysuckle.h b/src/honeysuckle.h
index f215528..378e0a1 100644
--- a/src/honeysuckle.h
+++ b/src/honeysuckle.h
@@ -80,27 +80,21 @@ int hs_parse_overloaded_(lua_State *L, ...);
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
+typedef union {
+ bool boolean;
+ lua_Integer integer;
+ lua_Number number;
+ char *string;
+ int stack_index;
+ lua_CFunction function;
+ void *userdata;
+} hs_value;
+
struct hs_tbl_entry {
hs_type key_type;
- union {
- bool boolean;
- lua_Integer integer;
- lua_Number number;
- char *string;
- int stack_index;
- lua_CFunction function;
- void *userdata;
- } key;
+ hs_value key;
hs_type value_type;
- union {
- bool boolean;
- lua_Integer integer;
- lua_Number number;
- char *string;
- int stack_index;
- lua_CFunction function;
- void *userdata;
- } value;
+ hs_value value;
};
#define hs_bool_bool(k, v) \