aboutsummaryrefslogtreecommitdiff
path: root/include/bh/bh.h
blob: f761518da203ea7dbd0d11a999e6588561d1cd69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef BHLIB_H
#define BHLIB_H

#include <bh/config.h>
#include <stddef.h>
#include "platform.h"


#define BH_INT_TO_PTR(x)                                                     \
    ((void *)((bh_intptr_t)(x)))

#define BH_UINT_TO_PTR(x)                                                    \
    ((void *)((bh_uintptr_t)(x)))

#define BH_PTR_TO_INT(x)                                                     \
    ((bh_intptr_t)(x))

#define BH_PTR_TO_UINT(x)                                                    \
    ((bh_uintptr_t)(x))

typedef int (*bh_equal_cb_t)(const void *, const void *);
typedef size_t (*bh_hash_cb_t)(const void *);

#endif /* BHLIB_H */