1234567891011121314151617181920212223242526272829303132333435363738 |
- #ifndef ARRAYS_H
- #define ARRAYS_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include <stdbool.h>
- #include "DataType.h"
- typedef struct {
- int realLength;
- int length;
- int next;
- int previous;
- Value* data;
- } SnuviArray;
- typedef struct {
- SnuviArray* data;
- int capacity;
- int usedStart;
- int freeStart;
- char padding[sizeof(SnuviArray*) - sizeof(int)];
- } SnuviArrays;
- void asInit(SnuviArrays* as);
- void asDelete(SnuviArrays* as);
- int asAllocate(SnuviArrays* as, int typeSize, int length);
- SnuviArray* asGet(SnuviArrays* as, int p);
- void asDeleteArray(SnuviArrays* as, SnuviArray* a, int p);
- #ifdef __cplusplus
- }
- #endif
- #endif
|