diff options
author | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-02-13 14:37:01 +0100 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-02-13 21:56:55 +0100 |
commit | 59e549150996ec4c8a049f893dad9ec95a4677e9 (patch) | |
tree | 2a9d72d5b7863a80a7c145adbb3f1a311b8a1fd9 /src/ltable.js | |
parent | ab14ee4aa480b21a6e5c6c4d8cdb1823951ed7c3 (diff) | |
download | fengari-59e549150996ec4c8a049f893dad9ec95a4677e9.tar.gz fengari-59e549150996ec4c8a049f893dad9ec95a4677e9.tar.bz2 fengari-59e549150996ec4c8a049f893dad9ec95a4677e9.zip |
Better use of module to avoid cyclic dependencies issues
Diffstat (limited to 'src/ltable.js')
-rw-r--r-- | src/ltable.js | 6 |
1 files changed, 5 insertions, 1 deletions
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 |