From: Wolfgang (Blub) Bumiller Date: Sun, 11 Nov 2012 09:51:40 +0000 (+0100) Subject: for arrays, ast_value will contain several ir_values, ir_v will point to the [0]... X-Git-Tag: 0.1~19^2~42 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=62d062f860c4388274b0545727b8ed1eb6b2db9d;p=xonotic%2Fgmqcc.git for arrays, ast_value will contain several ir_values, ir_v will point to the [0] element --- diff --git a/ast.c b/ast.c index 2f218e3..f10dbb2 100644 --- a/ast.c +++ b/ast.c @@ -312,7 +312,9 @@ ast_value* ast_value_new(lex_ctx ctx, const char *name, int t) self->uses = 0; memset(&self->constval, 0, sizeof(self->constval)); - self->ir_v = NULL; + self->ir_v = NULL; + self->ir_values = NULL; + self->ir_value_count = 0; return self; } diff --git a/ast.h b/ast.h index 76f2c26..1d9efb3 100644 --- a/ast.h +++ b/ast.h @@ -162,6 +162,8 @@ struct ast_value_s size_t uses; ir_value *ir_v; + ir_value **ir_values; + size_t ir_value_count; }; ast_value* ast_value_new(lex_ctx ctx, const char *name, int qctype);