lua-users home
lua-l archive

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

Lets say i have some lua that calls SomeFunc() which I've mapped to SomeFuncImplementation()
All my lua runs in environments that contain an ID.

here is the c:
int SomeFuncImplementation(lua_State * L)
   // I need the ID
   // How do i get it!?

   // This doesn't work because it's the environment of this c function which is useless to me
   lua_getfield(L, "ID", LUA_ENVIRONINDEX);

  // lua_getfenv() is useless cause i can't get the calling function on the stack to use this

It's seems like this should be easy, what am i missing?

- Chris