Skip to content

Commit 3fa39f7

Browse files
committed
fix duplicate lua_call binding for 5.1
1 parent dad15b4 commit 3fa39f7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/binding-factory.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ const luaBindings: Record<string, luaBindingFactoryFunc> = {
8282
},
8383
">=5.1.0": function(luaGlue: LuaEmscriptenModule){
8484
return {
85-
lua_call: function (L: LuaState, nargs: number, nresults: number) {
86-
return (this as Lua).lua_callk(L, nargs, nresults, 0, 0);
87-
},
88-
lua_callk: luaGlue.cwrap("lua_callk", "number", ["number", "number", "number", "number", "number"]),
8985
lua_getfield: luaGlue.cwrap("lua_getfield", "number", ["number", "number", "string"]),
9086
lua_setfield: luaGlue.cwrap("lua_setfield", null, ["number", "number", "string"]),
9187
// TODO 3rd param is a output param (currently ignored)
@@ -98,6 +94,10 @@ const luaBindings: Record<string, luaBindingFactoryFunc> = {
9894
},
9995
">=5.2.0": function(luaGlue: LuaEmscriptenModule){
10096
return {
97+
lua_call: function (L: LuaState, nargs: number, nresults: number) {
98+
return (this as Lua).lua_callk(L, nargs, nresults, 0, 0);
99+
},
100+
lua_callk: luaGlue.cwrap("lua_callk", "number", ["number", "number", "number", "number", "number"]),
101101
lua_getglobal: luaGlue.cwrap("lua_getglobal", "number", ["number", "string"]),
102102
lua_pcall: function (L: LuaState, nargs: number, nresults: number, msgh: number) {
103103
return (this as Lua).lua_pcallk(L, nargs, nresults, msgh, 0, 0);

0 commit comments

Comments
 (0)