From 35754b22d6130971a9d0b51177bfcb7c401bb196 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Wed, 24 May 2017 16:43:47 +1000 Subject: src/lobject.js: Introduce TValue.set*value for missing types --- src/lobject.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/lobject.js b/src/lobject.js index 54d4de9..aec7109 100644 --- a/src/lobject.js +++ b/src/lobject.js @@ -161,6 +161,31 @@ class TValue { this.value = x; } + setsvalue(x) { + this.type = CT.LUA_TLNGSTR; /* LUA_TSHRSTR? */ + this.value = x; + } + + setuvalue(x) { + this.type = CT.LUA_TUSERDATA; + this.value = x; + } + + setthvalue(x) { + this.type = CT.LUA_TTHREAD; + this.value = x; + } + + setclLvalue(x) { + this.type = CT.LUA_TLCL; + this.value = x; + } + + setclCvalue(x) { + this.type = CT.LUA_TCCL; + this.value = x; + } + sethvalue(x) { this.type = CT.LUA_TTABLE; this.value = x; -- cgit v1.2.3-70-g09d2