lua-users home
lua-l archive

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

Hello all,

Right now I'm using this snippet of code to do this:

  loObject = lua_getparam(1);
  luaL_arg_check(lua_istable(loObject), 1, "table expected");
  nNumber = lua_getnumber(lua_gettable());		

It gets the first number from the table that was passed to my C function from Lua.
However, I've got a feeling that this is a very roundabout way of doing things...

Does Lua store all values in a table in a continuous block ?
Could I perhaps just pass a pointer to this memory to my C function ?
Or am I completely barking up the wrong tree here ?

Thanks for any help,