✨ feat(infra/exdata): exdata as independent component
This commit is contained in:
35
infra/exdata/exdata_internal.h
Normal file
35
infra/exdata/exdata_internal.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include "uthash/utarray.h"
|
||||
|
||||
#include "exdata.h"
|
||||
|
||||
struct exdata_schema
|
||||
{
|
||||
UT_array *exdata_meta_array;
|
||||
};
|
||||
|
||||
struct exdata_meta
|
||||
{
|
||||
char *name;
|
||||
exdata_free *free_func;
|
||||
|
||||
void *free_arg;
|
||||
int idx;
|
||||
}__attribute__((aligned(sizeof(void*))));
|
||||
|
||||
|
||||
enum exdata_state
|
||||
{ INIT, ACTIVE, EXIT };
|
||||
|
||||
struct exdata
|
||||
{
|
||||
void *exdata;
|
||||
enum exdata_state state;
|
||||
};
|
||||
|
||||
struct exdata_handle
|
||||
{
|
||||
struct exdata_schema *schema;
|
||||
struct exdata *exdata_array;
|
||||
};
|
||||
Reference in New Issue
Block a user