aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-05-11 11:17:11 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-05-11 11:17:11 +0200
commitf42baa3087685417a280abf8bb4283afb9d5f3f9 (patch)
tree32b53c9c2f14f8f2a8caa22f6300910202ed24e8 /src
parenta9fe1ab76cb527d8bdafa3071f796b646aada17e (diff)
downloadfengari-f42baa3087685417a280abf8bb4283afb9d5f3f9.tar.gz
fengari-f42baa3087685417a280abf8bb4283afb9d5f3f9.tar.bz2
fengari-f42baa3087685417a280abf8bb4283afb9d5f3f9.zip
Freeze luaO_nilobject to catch any accidental overwrite
To remove along with asserts calls for any real use
Diffstat (limited to 'src')
-rw-r--r--src/lobject.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lobject.js b/src/lobject.js
index fe23d24..f926e85 100644
--- a/src/lobject.js
+++ b/src/lobject.js
@@ -182,6 +182,7 @@ class TValue {
}
const luaO_nilobject = new TValue(CT.LUA_TNIL, null);
+Object.freeze(luaO_nilobject);
module.exports.luaO_nilobject = luaO_nilobject;
class LClosure {