is it possible to obtain the lua state during a call from lua to c++ function via luabind?

[email protected]
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
consider i have such a function in c++:
luabind::object cppfunction()
{
  lua_State* l; //i need a lua state here which invoking this function.

  luabind::object table = luabind::newtable(l);
  table[1]="asdfjkl;";
  return table;
}

and it was registered to lua:
module(l)
[
  def("cppfunction",&cppfunction)
];

now how do i obtain the state in my cpp function?is it possible?
i can not use a singleton luastate,because i need more than one states
running parallel.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.