Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Concurrency::details::_ReentrantPPLLock lock;
- const char *my_call(lua_State *L, int arguments, int results)
- {
- Concurrency::details::_ReentrantPPLLock::_Scoped_lock slock(lock);
- if (!lua_isfunction(L, -(arguments+1)))
- {
- auto err = lua_tostring(L, -1);
- lua_remove(L, -1);
- return err;
- }
- if (lua_pcall(L, arguments, results, 0) != 0)
- {
- auto err = lua_tostring(L, -1);
- lua_remove(L, -1);
- return err;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment