mirror of
https://github.com/mirror/tinycc.git
synced 2025-03-08 08:40:08 +08:00
Reduce CString memory usage from 3 to two 2 words
This commit is contained in:
parent
7ed9c95ae7
commit
78c3ea30a6
3
tcc.h
3
tcc.h
@ -497,9 +497,10 @@ typedef int nwchar_t;
|
||||
|
||||
typedef struct CString {
|
||||
int size; /* size in bytes */
|
||||
void *data; /* either 'char *' or 'nwchar_t *' */
|
||||
int size_allocated;
|
||||
void *data; /* either 'char *' or 'nwchar_t *' */
|
||||
} CString;
|
||||
_Static_assert(sizeof(CString) == 16, "CString should only require 16 bytes");
|
||||
|
||||
/* type definition */
|
||||
typedef struct CType {
|
||||
|
Loading…
Reference in New Issue
Block a user