at work
This commit is contained in:
49
clib/cdynarr.h
Normal file
49
clib/cdynarr.h
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
#ifndef CDYNARR_H_QWERTY
|
||||
#define CDYNARR_H_QWERTY
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
typedef struct {
|
||||
int64_t* data;
|
||||
int capa;
|
||||
int size;
|
||||
} cintarr_t;
|
||||
|
||||
typedef struct {
|
||||
bool* data;
|
||||
int capa;
|
||||
int size;
|
||||
} cboolarr_t;
|
||||
|
||||
typedef struct {
|
||||
double* data;
|
||||
int capa;
|
||||
int size;
|
||||
} cfltarr_t;
|
||||
|
||||
|
||||
cintarr_t* new_cintarr(void);
|
||||
void* cintarr_init(cintarr_t* array);
|
||||
void* cintarr_append(cintarr_t* array, int64_t add);
|
||||
int64_t* cintarr_getref(cintarr_t* array);
|
||||
void cintarr_destroy(cintarr_t* array);
|
||||
void cintarr_free(cintarr_t* array);
|
||||
|
||||
cfltarr_t* new_cfltarr(void);
|
||||
void* cfltarr_init(cfltarr_t* array);
|
||||
void* cfltarr_append(cfltarr_t* array, double add);
|
||||
double* cfltarr_getref(cfltarr_t* array);
|
||||
void cfltarr_destroy(cfltarr_t* array);
|
||||
void cfltarr_free(cfltarr_t* array);
|
||||
|
||||
cboolarr_t* new_cboolarr(void);
|
||||
void* cboolarr_init(cboolarr_t* array);
|
||||
void* cboolarr_append(cboolarr_t* array, bool add);
|
||||
bool* cboolarr_getref(cboolarr_t* array);
|
||||
void cboolarr_destroy(cboolarr_t* array);
|
||||
void cboolarr_free(cboolarr_t* array);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user