From 1c89390356a9be59f6e87d11b3eeca2128cbd1bf Mon Sep 17 00:00:00 2001 From: ThePhD Date: Wed, 8 Jan 2020 10:46:22 -0500 Subject: [PATCH] Explicitly unsafe. --- examples/source/stack_aligned_function.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/source/stack_aligned_function.cpp b/examples/source/stack_aligned_function.cpp index b2a258ad..e7112d15 100644 --- a/examples/source/stack_aligned_function.cpp +++ b/examples/source/stack_aligned_function.cpp @@ -3,7 +3,7 @@ #include "assert.hpp" -int main(int, char*[]) { +int main(int, char* []) { sol::state lua; lua.script("function func (a, b) return (a + b) * 2 end"); @@ -18,11 +18,11 @@ int main(int, char*[]) { // with state_view's load(lua_Reader, ...) call... // here's a little bit of how you can work with the stack lua_State* L = lua.lua_state(); - sol::stack_aligned_function func(L, -1); + sol::stack_aligned_unsafe_function func(L, -1); lua_pushinteger(L, 5); // argument 1, using plain API lua_pushinteger(L, 6); // argument 2 - - // take 2 arguments from the top, + + // take 2 arguments from the top, // and use "stack_aligned_function" to call int result = func(sol::stack_count(2));