lua-users home
lua-l archive

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


Yeah, I have realized this is not a good idea and solving my issue another way.

-----Original Message-----
From: Javier Guerra [mailto:javier@guerrag.com] 
Sent: Thursday, June 04, 2009 10:33 PM
To: lua@bazar2.conectiva.com.br
Cc: Martin, Marcus
Subject: Re: Getting locals in C++

Martin, Marcus wrote:
> function Main(instance)
>     local fid = 17
>     InvokeCMethod()
> End
> 
> Can I get at the value of the above local variable from within the InvokeCMethod (in C code)? How would I do that?

besides checking the Lua internals, note that if that were a Lua function, it wouldn't be able to access locals either.  Doing something different in C is straining the contract between caller and callee, at the very least.


-- 
Javier