From: Wolfgang (Blub) Bumiller Date: Sun, 19 Aug 2012 17:39:58 +0000 (+0200) Subject: have function declarations of functions with prototypes take over the actual declarat... X-Git-Tag: 0.1-rc1~152 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=adda894976a77c07fb22fb346680fdac01df241e;p=xonotic%2Fgmqcc.git have function declarations of functions with prototypes take over the actual declaration's body's context data --- diff --git a/parser.c b/parser.c index a70b907..c196b8b 100644 --- a/parser.c +++ b/parser.c @@ -2004,6 +2004,8 @@ static bool parser_variable(parser_t *parser, ast_block *localblock) /* copy over the parameter names */ for (param = 0; param < fval->expression.params_count; ++param) ast_value_set_name(proto->expression.params[param], fval->expression.params[param]->name); + /* copy the new context */ + ast_ctx(proto) = ast_ctx(fval); /* now ditch the rest of the new data */ ast_function_delete(func);