binana/3.3.5a/include/storm/array.h

32 lines
716 B
C
Raw Normal View History

2024-07-07 03:00:06 -04:00
#ifndef STORM_ARRAY_H
#define STORM_ARRAY_H
2024-07-07 03:05:07 -04:00
#include <stdint.h>
#define STORM_TS_BASE_ARRAY(T) typedef struct TSBaseArray_##T TSBaseArray_##T; \
struct TSBaseArray_##T { \
2024-07-07 03:00:06 -04:00
void** vtable; \
uint32_t m_alloc; \
uint32_t m_count; \
T* m_data; \
2024-07-07 03:00:06 -04:00
};
#define STORM_TS_FIXED_ARRAY(T) typedef struct TSFixedArray_##T TSFixedArray_##T; \
struct TSFixedArray_##T { \
2024-07-07 03:00:06 -04:00
void** vtable; \
uint32_t m_alloc; \
uint32_t m_count; \
T* m_data; \
2024-07-07 03:00:06 -04:00
};
#define STORM_TS_GROWABLE_ARRAY(T) typedef struct TSGrowableArray_##T TSGrowableArray_##T; \
struct TSGrowableArray_##T { \
2024-07-07 03:00:06 -04:00
void** vtable; \
uint32_t m_alloc; \
uint32_t m_count; \
T* m_data; \
2024-07-07 03:00:06 -04:00
uint32_t m_chunk; \
};
#endif