diff options
Diffstat (limited to 'src/lobject.js')
-rw-r--r-- | src/lobject.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lobject.js b/src/lobject.js index ee7a51d..54d4de9 100644 --- a/src/lobject.js +++ b/src/lobject.js @@ -126,11 +126,21 @@ class TValue { this.value = x; } + chgfltvalue(x) { + assert(this.type == CT.LUA_TNUMFLT); + this.value = x; + } + setivalue(x) { this.type = CT.LUA_TNUMINT; this.value = x; } + chgivalue(x) { + assert(this.type == CT.LUA_TNUMINT); + this.value = x; + } + setnilvalue() { this.type = CT.LUA_TNIL; this.value = void 0; |