add direct typed array type test macro
This commit is contained in:
parent
4dbe72ae03
commit
5f43bf16b3
1
src/h.h
1
src/h.h
@ -283,6 +283,7 @@ enum Type {
|
|||||||
t_COUNT
|
t_COUNT
|
||||||
};
|
};
|
||||||
#define IS_ANY_ARR(T) ((T)>=t_hslice & (T)<=t_bitarr)
|
#define IS_ANY_ARR(T) ((T)>=t_hslice & (T)<=t_bitarr)
|
||||||
|
#define IS_DIRECT_TYARR(T) (((T)>=t_i8arr) & ((T)<=t_bitarr))
|
||||||
#define IS_SLICE(T) ((T)<=t_f64slice)
|
#define IS_SLICE(T) ((T)<=t_f64slice)
|
||||||
#define TO_SLICE(T) ((T) + t_hslice - t_harr) // Assumes T!=t_bitarr
|
#define TO_SLICE(T) ((T) + t_hslice - t_harr) // Assumes T!=t_bitarr
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user