Testing a Blitzmax wrapper for LuaJIT (using ffi)...

  • From: Lance Thornblad <lance.thornblad@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sat, 12 Sep 2015 23:47:49 -0600

Using the following code...

local ffi = require( "ffi" )

ffi.cdef[[
typedef struct { int a, b; } foo;
]]

local tt = ffi.new( "foo", 5, 8 )

print( " ----- " )
print( tt.a )
print( type( tt ) )
print( ffi.typeof( tt ) )
print( " ----- " )

I am expecting the result to be...

-----
5
cdata
foo
-----

Is that correct? Because the lines above and below "cdata" are blank and
I'm trying to find the cause.

Other related posts: