mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
PRAISE BASED EEVEE
This commit is contained in:
parent
289ded358c
commit
7b63057ba8
|
@ -20,8 +20,8 @@
|
|||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// This file was generated with a script.
|
||||
// Generated 2016-11-26 01:46:59.897910 UTC
|
||||
// This header was generated with sol v2.15.2 (revision 49a0f71)
|
||||
// Generated 2016-11-26 08:32:10.873025 UTC
|
||||
// This header was generated with sol v2.15.2 (revision 289ded3)
|
||||
// https://github.com/ThePhD/sol2
|
||||
|
||||
#ifndef SOL_SINGLE_INCLUDE_HPP
|
||||
|
@ -6936,7 +6936,7 @@ namespace sol {
|
|||
}
|
||||
int last = index + count;
|
||||
for (int i = index; i < last; ++i) {
|
||||
lua_remove(L, i);
|
||||
lua_remove(L, index);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ namespace sol {
|
|||
}
|
||||
int last = index + count;
|
||||
for (int i = index; i < last; ++i) {
|
||||
lua_remove(L, i);
|
||||
lua_remove(L, index);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -986,3 +986,49 @@ TEST_CASE("functions/same-type-closures", "make sure destructions are per-object
|
|||
REQUIRE_FALSE(check_failed);
|
||||
REQUIRE(last_my_closures.size() == 2);
|
||||
}
|
||||
|
||||
TEST_CASE("functions/stack-multi-return", "Make sure the stack is protected after multi-returns") {
|
||||
sol::state lua;
|
||||
lua.script("function f () return 1, 2, 3, 4, 5 end");
|
||||
|
||||
{
|
||||
sol::stack_guard sg(lua);
|
||||
sol::stack::push(lua, double(256.78));
|
||||
{
|
||||
int a, b, c, d, e;
|
||||
sol::stack_guard sg2(lua);
|
||||
sol::function f = lua["f"];
|
||||
sol::tie(a, b, c, d, e) = f();
|
||||
REQUIRE(a == 1);
|
||||
REQUIRE(b == 2);
|
||||
REQUIRE(c == 3);
|
||||
REQUIRE(d == 4);
|
||||
REQUIRE(e == 5);
|
||||
}
|
||||
double f = sol::stack::pop<double>(lua);
|
||||
REQUIRE(f == 256.78);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("functions/protected-stack-multi-return", "Make sure the stack is protected after multi-returns") {
|
||||
sol::state lua;
|
||||
lua.script("function f () return 1, 2, 3, 4, 5 end");
|
||||
|
||||
{
|
||||
sol::stack_guard sg(lua);
|
||||
sol::stack::push(lua, double(256.78));
|
||||
{
|
||||
int a, b, c, d, e;
|
||||
sol::stack_guard sg2(lua);
|
||||
sol::protected_function pf = lua["f"];
|
||||
sol::tie(a, b, c, d, e) = pf();
|
||||
REQUIRE(a == 1);
|
||||
REQUIRE(b == 2);
|
||||
REQUIRE(c == 3);
|
||||
REQUIRE(d == 4);
|
||||
REQUIRE(e == 5);
|
||||
}
|
||||
double f = sol::stack::pop<double>(lua);
|
||||
REQUIRE(f == 256.78);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user