73 #define BBARRAY_HEADER_SIZE (sizeof (BBArray) - sizeof (BBSize))
76 #define BBARRAY_MAX_DATASIZE (BBSIZE_MAX - sizeof (BBArray))
80 #define BBARRAY_MAX_LENGTH (BBARRAY_MAX_DATASIZE)
97 #define BBARRAY_SIZE_CALC(size, num_dims) \
98 (BBARRAY_HEADER_SIZE + (num_dims) * sizeof (int) + (size))
107 #define BBARRAY_SIZE(arr) BBARRAY_SIZE_CALC ((arr)->size, (arr)->dims)
117 #define BBARRAY_DATAPTR_CALC(arr, num_dims) \
119 ((char *)(arr) + BBARRAY_HEADER_SIZE + (num_dims) * sizeof (int)) \
132 #define BBARRAY_DATAPTR(arr) BBARRAY_DATAPTR_CALC((arr), (arr)->dims)
154 #define BBARRAY_ALLOC(size, dims, flags) \
158 BBARRAY_SIZE_CALC((size), (dims)), \
190 #define BBNULLARRAY (&bbEmptyArray)
369 BBArray* bb_array_alloc(
const char *type, BBSize dims,
const BBSize *lens);
389 BBArray* bb_array_alloc1d(
const char *type, BBSize len);
410 void bb_array_init(
BBArray *arr);
457 BBArray* bbArrayFromData(
const char *type,
BBInt length,
const void *data);
465 BBArray* bbArrayCastFromObject(
const BBObject *obj,
const char *typetag);
572 #define BBARRAY_NOTFOUND (-1)
736 #ifndef BB_DISABLE_DEPRECATED
738 # define BBARRAYSIZE(q,n) (20+(n)*sizeof(int)+(q))
739 # define BBARRAYDATA(p,n) ((void*)((char*)(p)+20+(n)*sizeof(int)))
741 #endif // !BB_DISABLE_DEPRECATED
745 #endif // BLITZ_ARRAY_H