summaryrefslogtreecommitdiff
path: root/src/lstring.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-23 14:31:31 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-23 15:06:33 +1000
commitdbb25922aad020bcf898c08e809811641561cd87 (patch)
treeb35a45434ac221f36b23f4f87e3775ccb6f56543 /src/lstring.js
parentb2fb7a9302693fe5e164469eedb802b54e460347 (diff)
downloadfengari-dbb25922aad020bcf898c08e809811641561cd87.tar.gz
fengari-dbb25922aad020bcf898c08e809811641561cd87.tar.bz2
fengari-dbb25922aad020bcf898c08e809811641561cd87.zip
src/ltable.js: Implement table_hash for lightuserdata
Diffstat (limited to 'src/lstring.js')
-rw-r--r--src/lstring.js3
1 files changed, 2 insertions, 1 deletions
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('');