After some research and some RTFS, I solved this problem. I completely barked an absolutely wrong tree.
, Lua API , longjmp , longjmp API.
Lua, lua_pcall(). :
lua_getfield(L, LUA_GLOBALSINDEX, "myfunction");
if(0 != lua_pcall(L, 0, 0, 0))
printf("Lua error: %s\n", lua_tostring(L, -1));
else
printf("Lua code ran OK.\n");