summaryrefslogtreecommitdiff
path: root/src/lapi.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-16 11:55:54 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-02-16 11:55:54 +0100
commit739b5c1888b38b2580adbe52a42b86372a7d146b (patch)
tree0c66b7a13dd7eb61e77b143b904b3f0f4ff76a49 /src/lapi.js
parente14d05a2c3994352c671d4d4af7194aa47967ca6 (diff)
downloadfengari-739b5c1888b38b2580adbe52a42b86372a7d146b.tar.gz
fengari-739b5c1888b38b2580adbe52a42b86372a7d146b.tar.bz2
fengari-739b5c1888b38b2580adbe52a42b86372a7d146b.zip
lua_pushnumber, lua_pushinteger, lua_pushstring, lua_pushboolean
Diffstat (limited to 'src/lapi.js')
-rw-r--r--src/lapi.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lapi.js b/src/lapi.js
index 0cb0a4b..71cf3f6 100644
--- a/src/lapi.js
+++ b/src/lapi.js
@@ -94,7 +94,7 @@ const lua_pushinteger = function(L, n) {
assert(L.top <= L.ci.top, "stack overflow");
};
-const lua_pushlstring = function(L, s, len) {
+const lua_pushlstring = function(L, s, len) { // TODO: embedded \0
assert(typeof s === "string");
assert(typeof n === "number");
@@ -113,6 +113,7 @@ const lua_pushstring = function (L, s) {
L.stack[L.top] = nil;
else {
let ts = new TValue(CT.LUA_TLNGSTR, s);
+ L.stack[L.top] = ts;
s = ts.value;
}
@@ -243,6 +244,7 @@ module.exports.lua_pushnumber = lua_pushnumber;
module.exports.lua_pushinteger = lua_pushinteger;
module.exports.lua_pushlstring = lua_pushlstring;
module.exports.lua_pushstring = lua_pushstring;
+module.exports.lua_pushboolean = lua_pushboolean;
module.exports.lua_version = lua_version;
module.exports.lua_atpanic = lua_atpanic;
module.exports.lua_gettop = lua_gettop;