small tweaks
parent
4e9bf5d6e7
commit
0c07910f0f
|
@ -34,16 +34,16 @@ function trim_multilines(str)
|
|||
return output
|
||||
end
|
||||
|
||||
io.input("./engine/fwk.h")
|
||||
local fwk_h = io.read("*all")
|
||||
fwk_h = fwk_h:gsub("#line", "//#line")
|
||||
fwk_h = fwk_h:gsub("#include", "//#include")
|
||||
io.input("./engine/v4k.h")
|
||||
local v4k_h = io.read("*all")
|
||||
v4k_h = v4k_h:gsub("#line", "//#line")
|
||||
v4k_h = v4k_h:gsub("#include", "//#include")
|
||||
|
||||
print('--autogenerated luajit bindings. do not edit.') -- .. os.date("%Y/%m/%d"))
|
||||
print('local ffi = require("ffi")')
|
||||
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(']])')
|
||||
|
@ -84,11 +84,11 @@ function _M.mat44()
|
|||
return m
|
||||
end
|
||||
|
||||
local fwk = ffi.load("fwk")
|
||||
local v4k = ffi.load("v4k")
|
||||
|
||||
return setmetatable( _M, {
|
||||
__index = function( table, key )
|
||||
return fwk[ key ]
|
||||
return v4k[ key ]
|
||||
end
|
||||
} )
|
||||
]])
|
Loading…
Reference in New Issue