summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-05 11:21:01 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-05 13:29:35 +1000
commit0c48b50fc0f9f447153e2bdb935fb940ca18a745 (patch)
tree38b91b9c304ae9263966d417e60e88f6a67f341e /src
parentb3e2cedff9b47285709d83d9dc53dde5f2ba19e5 (diff)
downloadfengari-0c48b50fc0f9f447153e2bdb935fb940ca18a745.tar.gz
fengari-0c48b50fc0f9f447153e2bdb935fb940ca18a745.tar.bz2
fengari-0c48b50fc0f9f447153e2bdb935fb940ca18a745.zip
Proto.source should be a string, not a TValue
Fixes ar.source being internal tvalue
Diffstat (limited to 'src')
-rw-r--r--src/ldblib.js2
-rw-r--r--src/ldump.js2
-rw-r--r--src/lparser.js2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/ldblib.js b/src/ldblib.js
index 4563eb0..ce0e19d 100644
--- a/src/ldblib.js
+++ b/src/ldblib.js
@@ -137,7 +137,7 @@ const db_getinfo = function(L) {
lauxlib.luaL_argerror(L, arg + 2, lua.to_luastring("invalid option", true));
lua.lua_newtable(L); /* table to collect results */
if (options.indexOf('S'.charCodeAt(0)) > -1) {
- settabss(L, lua.to_luastring("source", true), ar.source.value);
+ settabss(L, lua.to_luastring("source", true), ar.source);
settabss(L, lua.to_luastring("short_src", true), ar.short_src);
settabss(L, lua.to_luastring("linedefined", true), lua.to_luastring(`${ar.linedefined}`));
settabss(L, lua.to_luastring("lastlinedefined", true), lua.to_luastring(`${ar.lastlinedefined}`));
diff --git a/src/ldump.js b/src/ldump.js
index f36e18e..e26a214 100644
--- a/src/ldump.js
+++ b/src/ldump.js
@@ -150,7 +150,7 @@ const DumpFunction = function(f, psource, D) {
if (D.strip || f.source === psource)
DumpString(null, D); /* no debug info or same source as its parent */
else
- DumpString(f.source.value, D);
+ DumpString(f.source, D);
DumpInt(f.linedefined, D);
DumpInt(f.lastlinedefined, D);
DumpByte(f.numparams, D);
diff --git a/src/lparser.js b/src/lparser.js
index b8cfeed..d27f67a 100644
--- a/src/lparser.js
+++ b/src/lparser.js
@@ -1550,7 +1550,7 @@ const luaY_parser = function(L, z, buff, dyd, name, firstchar) {
lexstate.h = new TValue(defs.CT.LUA_TTABLE, ltable.luaH_new(L)); /* create table for scanner */
L.stack[L.top++] = lexstate.h;
funcstate.f = cl.p = new Proto(L);
- funcstate.f.source = new TValue(defs.CT.LUA_TLNGSTR, name);
+ funcstate.f.source = name;
lexstate.buff = buff;
lexstate.dyd = dyd;
dyd.actvar.n = dyd.gt.n = dyd.label.n = 0;