diff options
author | bloodstalker <thabogre@gmail.com> | 2019-01-20 09:30:15 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2019-01-20 09:30:15 +0000 |
commit | c52fb20b8480dad6d51ceaf215e8428062aa4541 (patch) | |
tree | 31a14521751c0ef238b226b64b5d2442ca617430 /main.py | |
parent | added the luaalloc option, needs testing. will do that on the bruiser side (diff) | |
download | faultreiber-c52fb20b8480dad6d51ceaf215e8428062aa4541.tar.gz faultreiber-c52fb20b8480dad6d51ceaf215e8428062aa4541.zip |
update
Diffstat (limited to 'main.py')
-rwxr-xr-x | main.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -184,6 +184,7 @@ class Argparser(object): parser.add_argument("--singlefile", action="store_true", help="the generated code will be put in a single file", default=False) parser.add_argument("--calloc", action="store_true", help="use calloc instead of malloc, defaults to false", default=False) parser.add_argument("--luaalloc", action="store_true", help="use calloc instead of malloc, defaults to false", default=False) + parser.add_argument("--luaheaders", type=str, help="the location of lua header files that need to get added to the lib files if luaalloc has been selected", default="") parser.add_argument("--singlefilename", type=str, help="name of the single file") self.args = parser.parse_args() if self.args.calloc and self.args.luaalloc: print("you have selected both calloc and lua_newuserdata. that can't possibly work.\n") @@ -282,6 +283,8 @@ class CodeGen(object): read_source.write("\n// automatically generated by faultrieber\n") read_source.write("// " + self.dnt + "\n\n") read_source.write(text.header_list) + if self.argparser.args.luaalloc: + read_source.write('#include "'+self.argparser.args.luaheaders+'"\n') read_source.write('#include "./read.h"\n') read_source.write('#include "./structs.h"\n\n') if self.argparser.args.calloc: read_source.write(text.ft_calloc_def) |