Mercurial > archived > louis > epitech > mq > rathaxes
view rathaxes_compiler_passes_look_for_locally_casted_variables_in_sequence_calls.patch @ 120:cbd9b9a49b63
wip, alloc_rx_skbuff actually an abstraction for netdev_allock_skb
author | Louis Opter <louis@lse.epita.fr> |
---|---|
date | Fri, 26 Jul 2013 21:06:45 -0700 |
parents | 5a663f8f0e54 |
children |
line wrap: on
line source
# HG changeset patch # User David Pineau <dav.pineau@gmail.com>, Louis Opter <louis@lse.epita.fr> # Parent 163975605ce8e4b9049deb60207358acc904f14c rathaxes: correctly resolve locally casted variables during sequence calls C variables declared locally and casted into Rathaxes types weren't taken into account during sequence calls. This changeset fixes it. diff --git a/rathaxes/compiler/passes/back/rtxIntrospect.inc.cws b/rathaxes/compiler/passes/back/rtxIntrospect.inc.cws --- a/rathaxes/compiler/passes/back/rtxIntrospect.inc.cws +++ b/rathaxes/compiler/passes/back/rtxIntrospect.inc.cws @@ -751,6 +751,8 @@ local theType; if (findElement(theVar.name, theChunk.type_map)) ref theType = theChunk.type_map[theVar.name]; + else if (findElement(theVar.name, theChunk.variables)) + ref theType = theChunk.variables[theVar.name].type_node; insert param.rtype; if (getArraySize(param.identifiers) > 2) {