We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a9e30c commit 1619ba1Copy full SHA for 1619ba1
src/lua.js
@@ -396,11 +396,14 @@ Lua.State = function (_L) {
396
// Auxiliary library takes precedence
397
(function() {
398
function wrap(func) {
399
- return function() {
400
- var args = slice.call(arguments, 0);
401
- args.splice(0, 0, this._L);
402
- return func.apply(null, args);
403
- };
+ return(function() {
+ var args = [this._L];
+ var l = arguments.length;
+ for (var i = 0; i < l; i++) {
+ args.push(arguments[i]);
404
+ }
405
+ return func.apply(null, args)
406
+ })
407
}
408
for (var i in Lua.lib) {
409
Lua.State.prototype[i] = wrap(Lua.lib[i]);
0 commit comments