summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lobject.js25
1 files changed, 25 insertions, 0 deletions
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;