Re: ffi and inline functions

  • From: Kaj Eijlers <bizziboi@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sun, 13 May 2012 22:23:10 -0700

Thanks, I was just getting to something similar -

local bin = ffi.load 'd3dx9_43.dll'

local math = setmetatable(
{
test = function()
print("test")
end
},
{
__index = function(self, key)  return bin[key];  end
}
)

return math

I should try the __index = lib. Slightly cleaner, didn't realize that would
work.

Kaj

Other related posts: