summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-08 18:16:22 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-08 18:23:08 +1000
commit99b3623834113e86b4302c2027a0422a2cdd09c3 (patch)
tree2ae5d130300b76c6912262ec201ecefc4894df02
parent9829c2859984e2e64a95392a3c9da18f38fd3302 (diff)
downloadfengari-99b3623834113e86b4302c2027a0422a2cdd09c3.tar.gz
fengari-99b3623834113e86b4302c2027a0422a2cdd09c3.tar.bz2
fengari-99b3623834113e86b4302c2027a0422a2cdd09c3.zip
src/lapi.js: Be consistent with aux_upvalue return type
-rw-r--r--src/lapi.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lapi.js b/src/lapi.js
index 64cb4e1..bf62931 100644
--- a/src/lapi.js
+++ b/src/lapi.js
@@ -502,7 +502,7 @@ const aux_upvalue = function(L, fi, n) {
let f = fi.value;
if (!(1 <= n && n <= f.nupvalues)) return null;
return {
- name: "",
+ name: [],
val: f.upvalue[n-1]
};
}
@@ -512,7 +512,7 @@ const aux_upvalue = function(L, fi, n) {
if (!(1 <= n && n <= p.upvalues.length)) return null;
let name = p.upvalues[n-1].name;
return {
- name: name ? name : "(*no name)",
+ name: name ? name : defs.to_luastring("(*no name)", true),
val: f.upvals[n-1].val()
};
}