diff options
author | daurnimator <quae@daurnimator.com> | 2018-02-04 15:33:28 -0800 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2018-02-04 15:33:28 -0800 |
commit | 0ba420d8a7c88ac52df0ba2e20c026ed9b8e5c70 (patch) | |
tree | 6caf74217b0e410c2595382bf2d866ea589ada7a | |
parent | b0ad3a83d4b59136a8246e9c524be7f80fd2f4a3 (diff) | |
download | fengari-0ba420d8a7c88ac52df0ba2e20c026ed9b8e5c70.tar.gz fengari-0ba420d8a7c88ac52df0ba2e20c026ed9b8e5c70.tar.bz2 fengari-0ba420d8a7c88ac52df0ba2e20c026ed9b8e5c70.zip |
src/lapi.js: Shorter boolean coercion
-rw-r--r-- | src/lapi.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lapi.js b/src/lapi.js index 4c2641d..7c9317e 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -354,7 +354,7 @@ const lua_pushcfunction = function(L, fn) { const lua_pushjsfunction = lua_pushcfunction; const lua_pushboolean = function(L, b) { - L.stack[L.top] = new TValue(LUA_TBOOLEAN, b ? true : false); + L.stack[L.top] = new TValue(LUA_TBOOLEAN, !!b); api_incr_top(L); }; |