small tweaks

main
Dominik Madarász 2024-01-01 22:16:01 +01:00
parent 4e9bf5d6e7
commit 0c07910f0f
1 changed files with 7 additions and 7 deletions

View File

@ -34,16 +34,16 @@ function trim_multilines(str)
return output return output
end end
io.input("./engine/fwk.h") io.input("./engine/v4k.h")
local fwk_h = io.read("*all") local v4k_h = io.read("*all")
fwk_h = fwk_h:gsub("#line", "//#line") v4k_h = v4k_h:gsub("#line", "//#line")
fwk_h = fwk_h:gsub("#include", "//#include") v4k_h = v4k_h:gsub("#include", "//#include")
print('--autogenerated luajit bindings. do not edit.') -- .. os.date("%Y/%m/%d")) print('--autogenerated luajit bindings. do not edit.') -- .. os.date("%Y/%m/%d"))
print('local ffi = require("ffi")') print('local ffi = require("ffi")')
print('ffi.cdef([[') print('ffi.cdef([[')
local result = lcpp.cppString(glue .. fwk_h, '-', {"-Znopass"}, 'fwk') local result = lcpp.cppString(glue .. v4k_h, '-', {"-Znopass"}, 'v4k')
--print( trim_multilines(result) ) --print( trim_multilines(result) )
print(']])') print(']])')
@ -84,11 +84,11 @@ function _M.mat44()
return m return m
end end
local fwk = ffi.load("fwk") local v4k = ffi.load("v4k")
return setmetatable( _M, { return setmetatable( _M, {
__index = function( table, key ) __index = function( table, key )
return fwk[ key ] return v4k[ key ]
end end
} ) } )
]]) ]])