diff options
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); + ''' |