Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Commit 5ca2f2e

Browse files
committed
Fix printgm & pushcclosure
1 parent 74f3093 commit 5ca2f2e

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/helpers.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ macro_rules! printgm {
3333
($state:expr, $($x:expr),*) => {
3434
{
3535
let stmt = format!( $($x,)* ); // Everything past the state will be as if it were inside a format! call.
36-
let lib = *rglua::LUA_SHARED;
37-
lib.lua_getglobal($state, rglua::cstring!("print") );
38-
lib.lua_pushstring($state, rglua::cstring!(stmt) );
36+
rglua::lua_getglobal!($state, rglua::cstring!("print") );
37+
rglua::lua_shared::lua_pushstring($state, rglua::cstring!(stmt) );
3938
// 1 arg, 0 results
40-
lib.lua_call($state, 1, 0);
39+
rglua::lua_shared::lua_call($state, 1, 0);
4140
}
4241
};
4342
}

src/lua_shared.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ macro_rules! lua_setglobal {
167167

168168
#[macro_export]
169169
macro_rules! lua_pushcfunction {
170-
($state:expr, $name:expr, $fnc:expr) => {
170+
($state:expr, $fnc:expr) => {
171171
lua_pushcclosure($state, $fnc, 0);
172172
}
173173
}

0 commit comments

Comments
 (0)