string-array cast
This commit is contained in:
parent
c0c845bee8
commit
3fb4d03f1b
@ -26,4 +26,7 @@ static inline void Array_realloc_size(Array* ar, u32 new_size){
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define Array_len(AR, T) ((AR)->size / sizeof(T))
|
#define Array_len(AR, T) ((AR)->size / sizeof(T))
|
||||||
#define Array_memset(A, VAL) memset((A)->data, VAL, (A)->size)
|
#define Array_memset(A, VAL) memset((A)->data, VAL, (A)->size)
|
||||||
|
|
||||||
|
#define str_castTo_Array(S) Array_construct_size((S).data, (S).size)
|
||||||
|
#define Array_castTo_str(S, IS_ZERO_TERMINATED) str_construct((S).data, (S).size, IS_ZERO_TERMINATED)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user