From 91427896625e01ce2ab7171e1cf2369c89e53658 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Tue, 2 May 2017 14:29:00 +1000 Subject: src/lobject: Add sethvalue method to TValue --- src/lobject.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lobject.js b/src/lobject.js index 5a202d4..5918a84 100644 --- a/src/lobject.js +++ b/src/lobject.js @@ -147,6 +147,11 @@ class TValue { this.value = x; } + sethvalue(x) { + this.type = CT.LUA_TTABLE; + this.value = x; + } + setfrom(tv) { /* in lua C source setobj2t is often used for this */ this.type = tv.type; this.value = tv.value; -- cgit v1.2.3-70-g09d2