aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-02-04 11:09:58 -0800
committerdaurnimator <quae@daurnimator.com>2018-02-04 11:09:58 -0800
commitd6891e1e0ab0eccd8df0cc316118696270703758 (patch)
tree89e67a3b0a3e418d0ee14f5845b3604185d91fd7
parente4acea84c0807c4a5d601a89d0ebba73f51eb05f (diff)
downloadfengari-d6891e1e0ab0eccd8df0cc316118696270703758.tar.gz
fengari-d6891e1e0ab0eccd8df0cc316118696270703758.tar.bz2
fengari-d6891e1e0ab0eccd8df0cc316118696270703758.zip
src/ljstype.js: Use Uint8Array instead of plain array
-rw-r--r--src/ljstype.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ljstype.js b/src/ljstype.js
index 4d46fa9..eb24ac5 100644
--- a/src/ljstype.js
+++ b/src/ljstype.js
@@ -1,6 +1,8 @@
"use strict";
-const luai_ctype_ = [
+const { luastring_of } = require('./defs.js');
+
+const luai_ctype_ = luastring_of(
0x00, /* EOZ */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0. */
0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00,
@@ -34,7 +36,7 @@ const luai_ctype_ = [
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* f. */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-];
+);
const ALPHABIT = 0;
const DIGITBIT = 1;