summaryrefslogtreecommitdiff
path: root/src/ldump.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ldump.js')
-rw-r--r--src/ldump.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/ldump.js b/src/ldump.js
index 09e5866..596a319 100644
--- a/src/ldump.js
+++ b/src/ldump.js
@@ -12,8 +12,7 @@ const {
LUA_TNUMINT,
LUA_TSHRSTR
},
- luastring_of,
- to_luastring
+ luastring_of
} = require('./defs.js');
const LUAC_DATA = luastring_of(25, 147, 13, 10, 26, 10);
@@ -37,11 +36,6 @@ const DumpBlock = function(b, size, D) {
D.status = D.writer(D.L, b, size, D.data);
};
-const DumpLiteral = function(s, D) {
- s = to_luastring(s);
- DumpBlock(s, s.length, D);
-};
-
const DumpByte = function(y, D) {
DumpBlock(luastring_of(y), 1, D);
};
@@ -172,7 +166,7 @@ const DumpFunction = function(f, psource, D) {
};
const DumpHeader = function(D) {
- DumpLiteral(LUA_SIGNATURE, D);
+ DumpBlock(LUA_SIGNATURE, LUA_SIGNATURE.length, D);
DumpByte(LUAC_VERSION, D);
DumpByte(LUAC_FORMAT, D);
DumpBlock(LUAC_DATA, LUAC_DATA.length, D);