From 59e549150996ec4c8a049f893dad9ec95a4677e9 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Mon, 13 Feb 2017 14:37:01 +0100 Subject: Better use of module to avoid cyclic dependencies issues --- src/ltable.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/ltable.js') diff --git a/src/ltable.js b/src/ltable.js index 6e3af15..95ca5a5 100644 --- a/src/ltable.js +++ b/src/ltable.js @@ -1,9 +1,13 @@ /*jshint esversion: 6 */ "use strict"; +const assert = require('assert'); + const lobject = require('./lobject.js'); +const nil = require('./ldo.js').nil; const Table = lobject.Table; + /* ** Try to find a boundary in table 't'. A 'boundary' is an integer index ** such that t[i] is non-nil and t[i+1] is nil (and 0 if t[1] is nil). @@ -26,5 +30,5 @@ Table.prototype.luaH_getn = function() { /* else must find a boundary in hash part */ else if (hash.size === 0) return j; - else return j; // TODO: unbound_search(t, j) => but why ? + else return hash.get(j); }; \ No newline at end of file -- cgit v1.2.3-54-g00ecf