summaryrefslogtreecommitdiff
path: root/src/lutf8lib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-01-06 19:32:31 +1100
committerdaurnimator <quae@daurnimator.com>2018-01-06 19:32:43 +1100
commita0fa83dc9c170542630dbc83d1732d3e7a6313e9 (patch)
treef49965560f11a43e0fcb8dbc6bae1ce9ee22cb93 /src/lutf8lib.js
parent110636150e4b3470e21622b022bec2844d8e8b2f (diff)
downloadfengari-a0fa83dc9c170542630dbc83d1732d3e7a6313e9.tar.gz
fengari-a0fa83dc9c170542630dbc83d1732d3e7a6313e9.tar.bz2
fengari-a0fa83dc9c170542630dbc83d1732d3e7a6313e9.zip
Expose lua.luastring_of to construct a lua 'string' from raw byte values
Diffstat (limited to 'src/lutf8lib.js')
-rw-r--r--src/lutf8lib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lutf8lib.js b/src/lutf8lib.js
index f581a9e..722d9f1 100644
--- a/src/lutf8lib.js
+++ b/src/lutf8lib.js
@@ -216,7 +216,7 @@ const funcs = {
};
/* pattern to match a single UTF-8 character */
-const UTF8PATT = Uint8Array.of(91, 0, 45, 127, 194, 45, 244, 93, 91, 128, 45, 191, 93, 42);
+const UTF8PATT = lua.luastring_of(91, 0, 45, 127, 194, 45, 244, 93, 91, 128, 45, 191, 93, 42);
const luaopen_utf8 = function(L) {
lauxlib.luaL_newlib(L, funcs);