From dbb25922aad020bcf898c08e809811641561cd87 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Tue, 23 May 2017 14:31:31 +1000 Subject: src/ltable.js: Implement table_hash for lightuserdata --- src/lstring.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lstring.js') diff --git a/src/lstring.js b/src/lstring.js index 1887e85..a5ee669 100644 --- a/src/lstring.js +++ b/src/lstring.js @@ -27,7 +27,8 @@ const luaS_eqlngstr = function(a, b) { return a == b || (a.realstring.length == b.realstring.length && a.realstring.join() == b.realstring.join()); }; -/* converts strings (arrays) to a consistent map key */ +/* converts strings (arrays) to a consistent map key + make sure this doesn't conflict with any of the anti-collision strategies in ltable */ const luaS_hash = function(str) { assert(Array.isArray(str)); return str.map(e => `${e}|`).join(''); -- cgit v1.2.3-54-g00ecf