diff options
author | bloodstalker <thabogre@gmail.com> | 2019-01-20 09:10:13 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2019-01-20 09:10:13 +0000 |
commit | 3722d534650099faeb8dae0bb1900a0738db0a78 (patch) | |
tree | 5844a5619d690b7e580c7615b7cf855504658d6d /text.py | |
parent | update (diff) | |
download | faultreiber-3722d534650099faeb8dae0bb1900a0738db0a78.tar.gz faultreiber-3722d534650099faeb8dae0bb1900a0738db0a78.zip |
added the luaalloc option, needs testing. will do that on the bruiser side
Diffstat (limited to 'text.py')
-rw-r--r-- | text.py | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -11,10 +11,10 @@ class text(): autogen_warning = "// automatically generated by faultreiber\n" last_comment = "// last line intentionally left blank\n\n" read_func_sig = "int read_structured_file(char* path)" - c_read_elem_sig = "void* ft_read_YYY(int _fd, XXX** dummy, void*** void_train, uint64_t* current_void_size, uint64_t* current_void_count) {\n" - c_read_elem_sig_h = "void* ft_read_YYY(int _fd, XXX** dummy, void*** void_train, uint64_t* current_void_size, uint64_t* current_void_count);\n" - c_read_elem_sig_c = "void* ft_read_YYY_c(int _fd, XXX** dummy, void*** void_train, uint64_t* current_void_size, uint64_t* current_void_count, uint64_t* agg_b_count) {\n" - c_read_elem_sig_h_c = "void* ft_read_YYY_c(int _fd, XXX** dummy, void*** void_train, uint64_t* current_void_size, uint64_t* current_void_count, uint64_t* agg_b_count);\n" + c_read_elem_sig = "void* ft_read_YYY(int _fd, XXX** dummy, void*** void_train, uint64_t* current_void_size, uint64_t* current_void_count ZZZ) {\n" + c_read_elem_sig_h = "void* ft_read_YYY(int _fd, XXX** dummy, void*** void_train, uint64_t* current_void_size, uint64_t* current_void_count ZZZ);\n" + c_read_elem_sig_c = "void* ft_read_YYY_c(int _fd, XXX** dummy, void*** void_train, uint64_t* current_void_size, uint64_t* current_void_count, uint64_t* agg_b_count ZZZ) {\n" + c_read_elem_sig_h_c = "void* ft_read_YYY_c(int _fd, XXX** dummy, void*** void_train, uint64_t* current_void_size, uint64_t* current_void_count, uint64_t* agg_b_count ZZZ);\n" #c_read_elem_sig_1 = "ft_read_XXX(_fd)" c_read_elem_sig_2 = "ft_read_XXX(_fd, YYY, ZZZ, current_void_size, current_void_count)" c_read_elem_sig_2_c = "ft_read_XXX_c(_fd, YYY, ZZZ, current_void_size, current_void_count, &agg_b_count)" @@ -131,3 +131,11 @@ void void_manager(void* ptr, void*** void_train, uint64_t* current_void_size, ui c_reserve_void_ptr = "malloc(XXX)" ft_calloc_def="#define ft_calloc(X1) calloc(X1, 1)\n" + ft_luanewuserdata_def="#define ft_luanewuserdata(X1) lua_newuserdata(__ls, X1)\n" + lua_udata_regindex = ''' + luaL_getmetatable(__ls, "XXX"); + lua_setmetatable(__ls, -2); + lua_pushlightuserdata(__ls, YYY); + lua_pushvalue(__ls, -2); + lua_settable(__ls, LUA_REGISTRYINDEX); + ''' |