|
|
@@ -26,17 +26,17 @@ int main() {
|
|
|
|
|
|
// Register 'my_function_1'
|
|
|
auto wrapped_1 = WrapFunction<void(float, const char*), my_function_1>;
|
|
|
- lua_pushcfunction(state, wrapped_1);
|
|
|
+ Push(state, wrapped_1);
|
|
|
lua_setglobal(state, "my_function_1");
|
|
|
|
|
|
// Register 'my_function_2'
|
|
|
auto wrapped_2 = WrapFunction<std::string(), my_function_2>;
|
|
|
- lua_pushcfunction(state, wrapped_2);
|
|
|
+ Push(state, wrapped_2);
|
|
|
lua_setglobal(state, "my_function_2");
|
|
|
|
|
|
// Register 'my_function_3'
|
|
|
auto wrapped_3 = WrapFunction<int(int, int), my_function_3>;
|
|
|
- lua_pushcfunction(state, wrapped_3);
|
|
|
+ Push(state, wrapped_3);
|
|
|
lua_setglobal(state, "my_function_3");
|
|
|
|
|
|
// Invoke the attached script
|