|
|
@@ -23,15 +23,15 @@ int main() {
|
|
|
|
|
|
// Register 'my_function_1'
|
|
|
auto wrapped_1 = LUWRA_WRAP(my_function_1);
|
|
|
- luwra::setGlobal(state, "my_function_1", wrapped_1);
|
|
|
+ state.set("my_function_1", wrapped_1);
|
|
|
|
|
|
// Register 'my_function_2'
|
|
|
auto wrapped_2 = LUWRA_WRAP(my_function_2);
|
|
|
- luwra::setGlobal(state, "my_function_2", wrapped_2);
|
|
|
+ state.set("my_function_2", wrapped_2);
|
|
|
|
|
|
// Register 'my_function_3'
|
|
|
auto wrapped_3 = LUWRA_WRAP(my_function_3);
|
|
|
- luwra::setGlobal(state, "my_function_3", wrapped_3);
|
|
|
+ state.set("my_function_3", wrapped_3);
|
|
|
|
|
|
// Load Lua code
|
|
|
int ret = state.runString(
|