From 539c571f0538e6184f038a7a2c733b0c6542b164 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 12 May 2017 12:36:06 +1000 Subject: src/ldebug.js: CClosures have no '.type' field, use instanceof --- src/ldebug.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ldebug.js b/src/ldebug.js index 7de5cdc..2369595 100644 --- a/src/ldebug.js +++ b/src/ldebug.js @@ -160,7 +160,7 @@ const lua_setlocal = function(L, ar, n) { }; const funcinfo = function(ar, cl) { - if (cl === null || cl.type === CT.LUA_TCCL) { + if (cl === null || cl instanceof lobject.CClosure) { ar.source = defs.to_luastring("=[JS]", true); ar.linedefined = -1; ar.lastlinedefined = -1; @@ -177,7 +177,7 @@ const funcinfo = function(ar, cl) { }; const collectvalidlines = function(L, f) { - if (f === null || f.c.type === CT.LUA_TCCL) { + if (f === null || f instanceof lobject.CClosure) { L.stack[L.top++] = new TValue(CT.LUA_TNIL, null); assert(L.top <= L.ci.top, "stack overflow"); } else { @@ -223,7 +223,7 @@ const auxgetinfo = function(L, what, ar, f, ci) { } case 'u': { ar.nups = f === null ? 0 : f.nupvalues; - if (f === null || f.type === CT.LUA_TCCL) { + if (f === null || f instanceof lobject.CClosure) { ar.isvararg = true; ar.nparams = 0; } else { -- cgit v1.2.3-70-g09d2