Update compiler to support groups/unions
This commit is contained in:
parent
7731509861
commit
9f75d0c7a6
6 changed files with 1588 additions and 1679 deletions
|
|
@ -12,6 +12,13 @@ extern char str_static[];
|
|||
|
||||
void str_reserve(struct str *v, int sz);
|
||||
|
||||
static void str_init(struct str *v, int sz) {
|
||||
v->str = str_static;
|
||||
v->len = v->cap = 0;
|
||||
if (sz)
|
||||
str_reserve(v, sz);
|
||||
}
|
||||
|
||||
static void str_release(struct str *v) {
|
||||
if (v->cap) {
|
||||
free(v->str);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue