mirror of
https://github.com/suchmememanyskill/TegraExplorer.git
synced 2024-12-02 00:32:10 +00:00
d6c4204027
Based on lockpick_rcm 1.9.0
20 lines
No EOL
617 B
C
20 lines
No EOL
617 B
C
#pragma once
|
|
#include <utils/types.h>
|
|
|
|
typedef struct {
|
|
void* data;
|
|
u32 capacity;
|
|
u32 count;
|
|
u32 elemSz;
|
|
// u32 typeTag;
|
|
} Vector_t;
|
|
|
|
#define vecAddElem(v, elem) vecAdd(v, &elem, sizeof(elem))
|
|
#define vecDefArray(type, varName, vec) type varName = (type)((vec).data)
|
|
#define vecGetArray(type, vec) (type)((vec).data)
|
|
#define vecPDefArray(type, varName, vec) type varName = (type)((vec)->data)
|
|
#define vecPGetArray(type, vec) (type)((vec)->data)
|
|
|
|
Vector_t newVec(u32 typesz, u32 preallocate);
|
|
Vector_t vecFromArray(void* array, u32 count, u32 typesz);
|
|
bool vecAdd(Vector_t* v, void* elem, u32 sz); |