[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Accessing Local lua table in C++
- From: David Given <dg@...>
- Date: Thu, 18 Jun 2009 12:23:27 +0100
Sivan Thiruvengadam wrote:
able to query the global lua table using the following code. which
queries the global lua table perfectly. Is there any identical mechanism
avaialble for querying local lua tables dynamically
You can't[*] --- Lua locals aren't kept track of by name internally and
are stored in an entirely different manner (which is why they're fast).
The only way of accessing your local is to call a C function with it as
an explicit parameter.
[*] To be technically accurate you can. But it requires a lot of hairy
knowledge of the Lua internals, breaks easily, and is not actually
useful except for debugging purposes.