diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-08-01 12:35:34 +0200 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-08-10 08:48:24 +0200 |
commit | cbcd6f9001d5b18957b7f5a3fb88865c863d9464 (patch) | |
tree | 167d7d03c3c48e3a5bfd0222865cca1fb499e806 /src/lauxlib.js | |
parent | 67d8a94eb7dd1f9f09a501cc6b39ac2cd11584da (diff) | |
download | fengari-cbcd6f9001d5b18957b7f5a3fb88865c863d9464.tar.gz fengari-cbcd6f9001d5b18957b7f5a3fb88865c863d9464.tar.bz2 fengari-cbcd6f9001d5b18957b7f5a3fb88865c863d9464.zip |
Use array of bytes instead of DataView (until we fetch binary)
Diffstat (limited to 'src/lauxlib.js')
-rw-r--r-- | src/lauxlib.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lauxlib.js b/src/lauxlib.js index 1314d34..d13b2bb 100644 --- a/src/lauxlib.js +++ b/src/lauxlib.js @@ -788,9 +788,9 @@ if (!WEB) { const getF = function(L, ud) { let lf = ud; - let dv = lf.f instanceof Uint8Array ? new DataView(new ArrayBuffer(lf.f)) : null; + let f = lf.f; lf.f = null; - return dv; + return f; }; getc = function(lf) { @@ -813,7 +813,7 @@ if (!WEB) { if (xhr.status >= 200 && xhr.status <= 299) { /* TODO: Synchronous xhr alway return a js string */ - lf.f = new Uint8Array(lua.to_luastring(xhr.response)); + lf.f = lua.to_luastring(xhr.response); } else { lf.err = xhr.status; return errfile(L, "open", fnameindex, xhr.status); |