more code
This commit is contained in:
parent
0c419d7ed1
commit
a8e9407375
|
@ -27,7 +27,8 @@ typedef struct SBufferWriter SBufferWriter;
|
||||||
typedef struct SBufferReader SBufferReader;
|
typedef struct SBufferReader SBufferReader;
|
||||||
|
|
||||||
// SBuffer
|
// SBuffer
|
||||||
#define tBufferInit() ((SBuffer){0, 0, NULL})
|
#define BUFFER_INITILIZER ((SBuffer){0, 0, NULL})
|
||||||
|
static int32_t tBufferInit(SBuffer *buffer);
|
||||||
static int32_t tBufferDestroy(SBuffer *buffer);
|
static int32_t tBufferDestroy(SBuffer *buffer);
|
||||||
static int32_t tBufferEnsureCapacity(SBuffer *buffer, uint32_t capacity);
|
static int32_t tBufferEnsureCapacity(SBuffer *buffer, uint32_t capacity);
|
||||||
#define tBufferGetSize(buffer) ((buffer)->size)
|
#define tBufferGetSize(buffer) ((buffer)->size)
|
||||||
|
|
|
@ -35,6 +35,13 @@ struct SBufferReader {
|
||||||
};
|
};
|
||||||
|
|
||||||
// SBuffer
|
// SBuffer
|
||||||
|
static FORCE_INLINE int32_t tBufferInit(SBuffer *buffer) {
|
||||||
|
buffer->size = 0;
|
||||||
|
buffer->capacity = 0;
|
||||||
|
buffer->data = NULL;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static FORCE_INLINE int32_t tBufferDestroy(SBuffer *buffer) {
|
static FORCE_INLINE int32_t tBufferDestroy(SBuffer *buffer) {
|
||||||
buffer->size = 0;
|
buffer->size = 0;
|
||||||
buffer->capacity = 0;
|
buffer->capacity = 0;
|
||||||
|
|
Loading…
Reference in New Issue