Is there a way to pass a table to Lua from BlitzMax? I can pass a Table from Lua to BlitzMax by returning the table from a function, calling that function from BMax and then pulling it off the stack with Lua_ToPointer. I've confirmed that this returns the correct point to the table.
However, passing it back, there is no Lua_PushPointer function ( at least not within the standard 5.12 Lua implementation. ) So I tried PushLightUserData since that is effectively your Byte Ptr-style swiss army knife of passing things around, but Lua does not seem to like this. My function ( which accepts a table as it's only parameter ) returns 1 instead of 0, and I can't seem to find an error code which corresponds with 1, so I'm not really sure what the error means.
Is there a better way to pass a table ( well pointer to a table ) to Lua from BMax?
However, passing it back, there is no Lua_PushPointer function ( at least not within the standard 5.12 Lua implementation. ) So I tried PushLightUserData since that is effectively your Byte Ptr-style swiss army knife of passing things around, but Lua does not seem to like this. My function ( which accepts a table as it's only parameter ) returns 1 instead of 0, and I can't seem to find an error code which corresponds with 1, so I'm not really sure what the error means.
Is there a better way to pass a table ( well pointer to a table ) to Lua from BMax?