summaryrefslogtreecommitdiff
path: root/src/lzio.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-12-13 14:47:45 +1100
committerdaurnimator <quae@daurnimator.com>2017-12-13 15:04:09 +1100
commita1ddb1f89944fc997d6f4a61445c48e8511610ca (patch)
treee3d8d9f9e91e1a6810dde2e00aafe1fcf672942b /src/lzio.js
parentd8e002a33c6b212891d09a2221edd0f516d13d9a (diff)
downloadfengari-a1ddb1f89944fc997d6f4a61445c48e8511610ca.tar.gz
fengari-a1ddb1f89944fc997d6f4a61445c48e8511610ca.tar.bz2
fengari-a1ddb1f89944fc997d6f4a61445c48e8511610ca.zip
src/llex.js: Use luaZ_buffer when not using .slice
Diffstat (limited to 'src/lzio.js')
-rw-r--r--src/lzio.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lzio.js b/src/lzio.js
index 9aa25bd..3d877aa 100644
--- a/src/lzio.js
+++ b/src/lzio.js
@@ -10,6 +10,10 @@ class MBuffer {
}
}
+const luaZ_buffer = function(buff) {
+ return buff.buffer;
+};
+
const luaZ_buffremove = function(buff, i) {
buff.n -= i;
};
@@ -84,6 +88,7 @@ const luaZ_read = function(z, b, b_offset, n) {
};
module.exports.EOZ = EOZ;
+module.exports.luaZ_buffer = luaZ_buffer;
module.exports.luaZ_buffremove = luaZ_buffremove;
module.exports.luaZ_fill = luaZ_fill;
module.exports.luaZ_read = luaZ_read;