lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi.

Can I pass a Lua table pointer to a C function? I would like to use Lua
table in C in read-only way. I tried following:

static int f(lua_State *L)
{
  double *pDoubleAry = NULL;

  // First parameter is a Lua table
  pDoubleAry = (double *)lua_topointer(L, 1);
...

I get some values but not definitely correct ones.


Floru