lua-users home
lua-l archive

[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$$b$1"       |$$ ,`      ,$$"             ``'          $$
 ```"```'"    `"`         `""`        ""`                          ,P`
"As a general rule,don't solve puzzles that open portals to Hell"'