mirror of
https://github.com/bellard/quickjs.git
synced 2025-09-30 15:04:24 +03:00
Strip trailing spaces
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* QuickJS: binary JSON module (test only)
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2017-2019 Fabrice Bellard
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
@@ -32,7 +32,7 @@ static JSValue js_bjson_read(JSContext *ctx, JSValueConst this_val,
|
||||
JSValue obj;
|
||||
size_t size;
|
||||
int flags;
|
||||
|
||||
|
||||
if (JS_ToIndex(ctx, &pos, argv[1]))
|
||||
return JS_EXCEPTION;
|
||||
if (JS_ToIndex(ctx, &len, argv[2]))
|
||||
@@ -56,7 +56,7 @@ static JSValue js_bjson_write(JSContext *ctx, JSValueConst this_val,
|
||||
uint8_t *buf;
|
||||
JSValue array;
|
||||
int flags;
|
||||
|
||||
|
||||
flags = 0;
|
||||
if (JS_ToBool(ctx, argv[1]))
|
||||
flags |= JS_WRITE_OBJ_REFERENCE;
|
||||
|
Reference in New Issue
Block a user