aboutsummaryrefslogtreecommitdiff
path: root/include/bh/bh.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/bh/bh.h')
-rw-r--r--include/bh/bh.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/bh/bh.h b/include/bh/bh.h
index d00dc5c..f761518 100644
--- a/include/bh/bh.h
+++ b/include/bh/bh.h
@@ -3,18 +3,20 @@
#include <bh/config.h>
#include <stddef.h>
+#include "platform.h"
+
#define BH_INT_TO_PTR(x) \
- ((void *)((long)(x)))
+ ((void *)((bh_intptr_t)(x)))
#define BH_UINT_TO_PTR(x) \
- ((void *)((unsigned long)(x)))
+ ((void *)((bh_uintptr_t)(x)))
#define BH_PTR_TO_INT(x) \
- ((long)(x))
+ ((bh_intptr_t)(x))
#define BH_PTR_TO_UINT(x) \
- ((unsigned long)(x))
+ ((bh_uintptr_t)(x))
typedef int (*bh_equal_cb_t)(const void *, const void *);
typedef size_t (*bh_hash_cb_t)(const void *);