Re: Replace LUA table
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Replace LUA table
- From: Tomas Guisasola Gorham <tomas@...>
- Date: 2007年8月28日 14:24:44 -0300 (BRT)
Hi Andreas
> If I don't "lua_remove(L, 2);" then the new table is after the input table. But is there any way to access this new table in LUA?
You have to return it to the caller. Something like:
...
array2table( L, lobj );
lua_remove(L, 2);
printf ("dump2:\n");
stackDump (L);
return 1;
And in your Lua code:
...
a = tc:testX (a)
print(a[1])
...
Now the variable `a' has a new value!
Tomás