aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2019-01-20 10:58:19 +0000
committerbloodstalker <thabogre@gmail.com>2019-01-20 10:58:19 +0000
commit8275d81a545d95e4f118b482b28f0588068ca550 (patch)
treecaa8ead6be50d3cb25bbcd473b7e63e768b53c12
parentupdate (diff)
downloadfaultreiber-8275d81a545d95e4f118b482b28f0588068ca550.tar.gz
faultreiber-8275d81a545d95e4f118b482b28f0588068ca550.zip
upate
-rwxr-xr-xmain.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.py b/main.py
index 9174ec5..a8302cc 100755
--- a/main.py
+++ b/main.py
@@ -708,7 +708,10 @@ class CodeGen(object):
agg_source.write("lib_ret->obj->" + elem.attrib["name"] + "_container = realloc(lib_ret->obj->"+elem.attrib["name"]+"_container,"+"sizeof("+elem.attrib["name"]+")*("+elem.attrib["name"]+"_agg_count"+" +1));\n")
else:
agg_source.write("lib_ret->obj->" + elem.attrib["name"] + "_container = realloc(lib_ret->obj->"+elem.attrib["name"]+"_container,"+"sizeof("+elem.attrib["name"]+")*("+elem.attrib["name"]+"_agg_count"+" +1));\n")
- agg_source.write("lib_ret->obj->"+elem.attrib["name"] + "_container["+elem.attrib["name"]+"_agg_count"+"] = " + "ft_read_" + elem.attrib["name"] + "(_fd, &lib_ret->obj->" + elem.attrib["name"] + "_container["+elem.attrib["name"]+"_agg_count"+"], " + "&lib_ret->void_train, &lib_ret->current_void_size, &lib_ret->current_void_count);\n")
+ if self.argparser.args.luaalloc:
+ agg_source.write("lib_ret->obj->"+elem.attrib["name"] + "_container["+elem.attrib["name"]+"_agg_count"+"] = " + "ft_read_" + elem.attrib["name"] + "(_fd, &lib_ret->obj->" + elem.attrib["name"] + "_container["+elem.attrib["name"]+"_agg_count"+"], " + "__ls, &lib_ret->current_void_size, &lib_ret->current_void_count);\n")
+ else:
+ agg_source.write("lib_ret->obj->"+elem.attrib["name"] + "_container["+elem.attrib["name"]+"_agg_count"+"] = " + "ft_read_" + elem.attrib["name"] + "(_fd, &lib_ret->obj->" + elem.attrib["name"] + "_container["+elem.attrib["name"]+"_agg_count"+"], " + "&lib_ret->void_train, &lib_ret->current_void_size, &lib_ret->current_void_count);\n")
agg_source.write(elem.attrib["name"] + "_agg_count++;\n")
if "unordered" in elem.attrib: agg_source.write("}\n")