Skip to content

Commit

Permalink
for xsnap
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Soquet committed Jan 2, 2022
1 parent 5f8ba4f commit 3ef6c22
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions modules/data/text/decoder/textdecoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,12 @@ void modInstallTextDecoder(xsMachine *the)

xsVar(kScratch) = xsNewHostFunction(xs_textdecoder_decode, 1);
xsmcSet(xsVar(kPrototype), xsID("decode"), xsVar(kScratch));
xsmcDefine(xsVar(kPrototype), xsID("encoding"), xsNewHostFunction(xs_textdecoder_get_encoding, 0), xsIsGetter);
xsmcDefine(xsVar(kPrototype), xsID("ignoreBOM"), xsNewHostFunction(xs_textdecoder_get_ignoreBOM, 0), xsIsGetter);
xsmcDefine(xsVar(kPrototype), xsID("fatal"), xsNewHostFunction(xs_textdecoder_get_fatal, 0), xsIsGetter);
xsVar(kScratch) = xsNewHostFunction(xs_textdecoder_get_encoding, 0);
xsmcDefine(xsVar(kPrototype), xsID("encoding"), xsVar(kScratch), xsIsGetter);
xsVar(kScratch) = xsNewHostFunction(xs_textdecoder_get_ignoreBOM, 0);
xsmcDefine(xsVar(kPrototype), xsID("ignoreBOM"), xsVar(kScratch), xsIsGetter);
xsVar(kScratch) = xsNewHostFunction(xs_textdecoder_get_fatal, 0);
xsmcDefine(xsVar(kPrototype), xsID("fatal"), xsVar(kScratch), xsIsGetter);

xsEndHost(the);
}
Expand Down
2 changes: 1 addition & 1 deletion xs/sources/xsSnapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static void fxWriteStack(txMachine* the, txSnapshot* snapshot);
#define mxThrowIf(_ERROR) { if (_ERROR) { snapshot->error = _ERROR; fxJump(the); } }
#define mxChunkFlag 0x80000000

#define mxCallbacksLength 492
#define mxCallbacksLength 495
static txCallback gxCallbacks[mxCallbacksLength] = {
fx_AggregateError,
fx_Array_from,
Expand Down

0 comments on commit 3ef6c22

Please sign in to comment.