mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Remove strerror deprecation remark
This commit is contained in:
parent
166771ae8d
commit
16c6f62fe3
@ -307,11 +307,13 @@ inline int luaL_fileresult(lua_State *L, int stat, const char *fname) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
char buf[1024];
|
||||||
|
strerror_s(buf, 1024, en);
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
if (fname)
|
if (fname)
|
||||||
lua_pushfstring(L, "%s: %s", fname, strerror(en));
|
lua_pushfstring(L, "%s: %s", fname, buf);
|
||||||
else
|
else
|
||||||
lua_pushstring(L, strerror(en));
|
lua_pushstring(L, buf);
|
||||||
lua_pushnumber(L, (lua_Number)en);
|
lua_pushnumber(L, (lua_Number)en);
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
@ -504,7 +504,6 @@ TEST_CASE("advanced/call_lambdas", "A C++ lambda is exposed to lua and called")
|
|||||||
REQUIRE(x == 9);
|
REQUIRE(x == 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST_CASE("advanced/call_referenced_obj", "A C++ object is passed by pointer/reference_wrapper to lua and invoked") {
|
TEST_CASE("advanced/call_referenced_obj", "A C++ object is passed by pointer/reference_wrapper to lua and invoked") {
|
||||||
sol::state lua;
|
sol::state lua;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user