lua-users home
lua-l archive

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

Thanks to Dirk, that correctly points out that Lua doesn't really know.

Thanks to Philipp too. But to use different xl_getxtable() functions, I 
have to use
different metatables, and the same even using userdata.

The best thing I can think of is to create a lua table for every array 
I want to export.
All the lua tables share the same metatable, and 
hence the same function xl_getxtable().
Just after creation of a table, 
I store the lua item in a pascal variable. I will end up with
a few 
variables, each containing the "lua reference" for the just created 
When xl_getxtable() is called from lua, it will find on the lua 
stack the key
and the table (some kind of pointer), which I can compare 
with the values stored
in my variables. It should work, I suppose that 
lua refers to the same table using always the 
same value or pointer - 
don't you think so?