lua-users home
lua-l archive

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


> > is it possible to find out what environment is associated with

> > function at the specified call stack level? 

> Yes, with the function getfenv: http://www.lua.org/manual/5.1/manual.html#pdf-getfenv


:-) but how is it possible to obtain a function object in the Lua

stack, in case when we have properly filled instance of the lua_Debug

structure only?


I found that there is i_ci variable in the private part of this

structure, but have no clue how to get a calling function from it.

Is it the right way to get the calling function?



Yours respectfully,


Dmitriy Iassenev, iassenev@gsc-game.kiev.ua

 Phone (mobile): +380958392212

  ICQ: 72752187

   GSC Game World - Ukraine, Kyiv

    http://www.stalker-game.comhttp://www.gsc-game.com