diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-02 14:29:00 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-02 14:29:00 +1000 |
commit | 91427896625e01ce2ab7171e1cf2369c89e53658 (patch) | |
tree | c0b532775ab734dc9febe5a8029eb9789aa173df /src | |
parent | 30264bbc1998ab6640afdc31c348ca6167ca6191 (diff) | |
download | fengari-91427896625e01ce2ab7171e1cf2369c89e53658.tar.gz fengari-91427896625e01ce2ab7171e1cf2369c89e53658.tar.bz2 fengari-91427896625e01ce2ab7171e1cf2369c89e53658.zip |
src/lobject: Add sethvalue method to TValue
Diffstat (limited to 'src')
-rw-r--r-- | src/lobject.js | 5 |
1 files changed, 5 insertions, 0 deletions
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; |