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)), \
176 #define BBARRAY_ISCOMPLEX(arr) \
178 (arr)->type[0] == ':' || \
179 (arr)->type[0] == '$' || \
180 (arr)->type[0] == '[' \
210 #define BBNULLARRAY (&bbEmptyArray)
389 BBArray* bb_array_alloc(
const char *type, BBSize dims,
const BBSize *lens);
409 BBArray* bb_array_alloc1d(
const char *type, BBSize len);
430 void bb_array_init(
BBArray *arr);
487 BBArray* bbArrayFromData(
const char *type,
BBInt length,
const void *data);
495 BBArray* bbArrayCastFromObject(
const BBObject *obj,
const char *typetag);
584 void* bbArrayToCArray(
const BBArray *arr);
620 #define BBARRAY_NOTFOUND (-1)
786 #ifndef BB_DISABLE_DEPRECATED
788 # define BBARRAYSIZE(q,n) (20+(n)*sizeof(int)+(q))
789 # define BBARRAYDATA(p,n) ((void*)((char*)(p)+20+(n)*sizeof(int)))
791 #endif // !BB_DISABLE_DEPRECATED
795 #endif // BLITZ_ARRAY_H