lua-users home
lua-l archive

Re: How to access a lua variable from C?

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


Stephen Kellett wrote:
In message <a54d2e230511070732u4dbd0709j63993340b8b354a6@mail.gmail.com>, Groleo Marius <groleo@gmail.com> writes
Is it possible to access a lua varibale from C code?
Any links/tutorials/code on this?
What about Section IV "The C API" of Programming in Lua by Roberto Ierusalimschy?
Also, in the recent 5.1 Beta, the lua_getlocal() function can be used on C functions. This has been very use to me for getting function params and locals from the Lua stack. See manual.html for details.
--
chris marrin ,"",ドル
chris@marrin.com b` $ ,,.
 mP b' , 1$'
 ,.` ,b` ,` :$$'
 ,|` mP ,` ,mm
 ,b" b" ,` ,mm m$$ ,m ,`P$$
 m$` ,b` .` ,mm ,'|$P ,|"1$` ,b$P ,` :1ドル
 b$` ,$: :,`` |$$ ,` $$` ,|` ,$,,ドル`"$$ .` :$|
b$| _m$`,:` :1ドル ,` ,$Pm|` ` :$,ドル..;"' |$:
P$b, _;b$$b1ドル" |$$ ,` ,$$" ``' $$
 ```"```'" `"` `""` ""` ,P`
"As a general rule,don't solve puzzles that open portals to Hell"'

AltStyle によって変換されたページ (->オリジナル) /