summaryrefslogtreecommitdiff
path: root/pp2cc.py
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2011-12-03 12:02:01 +0000
committerPeter Wu <lekensteyn@gmail.com>2011-12-03 12:02:01 +0000
commit658bfe6c92b6dccea353da38a7651c61cd4ef1ce (patch)
tree0e4c643f56e56a741e6593adedc3bcf01ba7c3ad /pp2cc.py
parent6045870ad6e5b59a0c4f54eaa5a29018c985f343 (diff)
downloadpp2cc-658bfe6c92b6dccea353da38a7651c61cd4ef1ce.tar.gz
Support global static variables
Diffstat (limited to 'pp2cc.py')
-rwxr-xr-xpp2cc.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp2cc.py b/pp2cc.py
index 8f6a581..03a57a1 100755
--- a/pp2cc.py
+++ b/pp2cc.py
@@ -1000,7 +1000,8 @@ class Parse(object):
size += 1
try:
- linked_node.variables.declName(name, size)
+ is_static = "static" in linked_node.node.storage
+ linked_node.variables.declName(name, size, is_static=is_static)
# address of variable split up in register and displacement
var_reg, var_disp = linked_node.variables.getAddress(name)
except RuntimeError as errmsg: