Skip to content

Commit

Permalink
Merge remote-tracking branch 'fengari/refs/pull/165/head'
Browse files Browse the repository at this point in the history
  • Loading branch information
daurnimator committed Aug 14, 2019
2 parents 4f7a043 + 91323c6 commit 0c9631c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ UNRELEASED

- Add os.setlocale that only understands the C locale
- Fix incorrect length for certain tables
- Remove luai_apicheck
- Note: this will be the last release to support Node 6 and Node 11


Expand Down
6 changes: 1 addition & 5 deletions src/llimits.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
"use strict";

const { luai_apicheck } = require("./luaconf.js");

const lua_assert = function(c) {
if (!c) throw Error("assertion failed");
};
module.exports.lua_assert = lua_assert;

module.exports.luai_apicheck = luai_apicheck || function(l, e) { return lua_assert(e); };

const api_check = function(l, e, msg) {
return luai_apicheck(l, e && msg);
if (!e) throw Error(msg);
};
module.exports.api_check = api_check;

Expand Down
5 changes: 0 additions & 5 deletions src/luaconf.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@ const lua_getlocaledecpoint = function() {
return 46 /* '.'.charCodeAt(0) */;
};

const luai_apicheck = function(l, e) {
if (!e) throw Error(e);
};

/*
@@ LUAL_BUFFERSIZE is the buffer size used by the lauxlib buffer system.
*/
Expand Down Expand Up @@ -220,4 +216,3 @@ module.exports.lua_getlocaledecpoint = lua_getlocaledecpoint;
module.exports.lua_integer2str = lua_integer2str;
module.exports.lua_number2str = lua_number2str;
module.exports.lua_numbertointeger = lua_numbertointeger;
module.exports.luai_apicheck = luai_apicheck;

0 comments on commit 0c9631c

Please sign in to comment.