* 更新sol2

This commit is contained in:
2026-04-05 16:05:29 +08:00
parent b7f8b92fe9
commit 4ed1555402
317 changed files with 45686 additions and 28920 deletions
+17
View File
@@ -0,0 +1,17 @@
#define SOL_ALL_SAFETIES_ON 1
#include <sol/sol.hpp>
int main() {
sol::state lua;
int x = 0;
lua.set_function("beep", [&x] { ++x; });
lua.script("beep()");
sol_c_assert(x == 1);
sol::function beep = lua["beep"];
beep();
sol_c_assert(x == 2);
return 0;
}