mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
single header file, head forward
This commit is contained in:
parent
6a3b0adf0d
commit
f2667827ca
@ -20,8 +20,8 @@
|
|||||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// This file was generated with a script.
|
// This file was generated with a script.
|
||||||
// Generated 2016-08-30 22:16:25.077226 UTC
|
// Generated 2016-09-01 12:50:16.642849 UTC
|
||||||
// This header was generated with sol v2.12.2 (revision 5093f61)
|
// This header was generated with sol v2.12.2 (revision 6a3b0ad)
|
||||||
// https://github.com/ThePhD/sol2
|
// https://github.com/ThePhD/sol2
|
||||||
|
|
||||||
#ifndef SOL_SINGLE_INCLUDE_HPP
|
#ifndef SOL_SINGLE_INCLUDE_HPP
|
||||||
@ -8672,8 +8672,8 @@ namespace sol {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
int luacall(std::ptrdiff_t argcount, std::ptrdiff_t resultcount, handler& h) const {
|
call_status luacall(std::ptrdiff_t argcount, std::ptrdiff_t resultcount, handler& h) const {
|
||||||
return lua_pcallk(base_t::lua_state(), static_cast<int>(argcount), static_cast<int>(resultcount), h.stackindex, 0, nullptr);
|
return static_cast<call_status>(lua_pcallk(base_t::lua_state(), static_cast<int>(argcount), static_cast<int>(resultcount), h.stackindex, 0, nullptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<std::size_t... I, typename... Ret>
|
template<std::size_t... I, typename... Ret>
|
||||||
@ -8712,9 +8712,12 @@ namespace sol {
|
|||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
#endif // No Exceptions
|
#endif // No Exceptions
|
||||||
code = static_cast<call_status>(luacall(n, LUA_MULTRET, h));
|
code = luacall(n, LUA_MULTRET, h);
|
||||||
int poststacksize = lua_gettop(base_t::lua_state());
|
int poststacksize = lua_gettop(base_t::lua_state());
|
||||||
returncount = poststacksize - (stacksize - 1);
|
returncount = poststacksize - (stacksize - 1);
|
||||||
|
if (code != call_status::yielded && != call_status::ok) {
|
||||||
|
return protected_function_result(base_t::lua_state(), lua_absindex(base_t::lua_state(), -1), returncount, returncount, code);
|
||||||
|
}
|
||||||
#ifndef SOL_NO_EXCEPTIONS
|
#ifndef SOL_NO_EXCEPTIONS
|
||||||
}
|
}
|
||||||
// Handle C++ errors thrown from C++ functions bound inside of lua
|
// Handle C++ errors thrown from C++ functions bound inside of lua
|
||||||
@ -11699,6 +11702,9 @@ namespace sol {
|
|||||||
luacall(n, LUA_MULTRET);
|
luacall(n, LUA_MULTRET);
|
||||||
int poststacksize = lua_gettop(lua_state());
|
int poststacksize = lua_gettop(lua_state());
|
||||||
int returncount = poststacksize - (firstreturn - 1);
|
int returncount = poststacksize - (firstreturn - 1);
|
||||||
|
if (error()) {
|
||||||
|
return protected_function_result(lua_state(), lua_absindex(lua_state(), -1), 1, returncount, status());
|
||||||
|
}
|
||||||
return protected_function_result(lua_state(), firstreturn, returncount, returncount, status());
|
return protected_function_result(lua_state(), firstreturn, returncount, returncount, status());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user