Skip to content

Conversation

bnoordhuis
Copy link
Contributor

I find it convenient to have access to JS_ReadObject and JS_WriteObject from JS land. That's precisely the functionality that tests/bjson.c provides, ergo, move it into quickjs-libc.c

I find it convenient to have access to JS_ReadObject and JS_WriteObject
from JS land. That's precisely the functionality that tests/bjson.c
provides, ergo, move it into quickjs-libc.c
Comment on lines +4111 to +4113
flags = 0;
if (JS_ToBool(ctx, argv[3]))
flags |= JS_READ_OBJ_REFERENCE;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a follow-up, assuming y'all think it's a good idea in the first place, I want to change this to an int and export the JS_READ_OBJ flags to JS land as module constants; ditto for writing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For posterity: #479

@bnoordhuis bnoordhuis merged commit 5a50ce3 into quickjs-ng:master Aug 11, 2024
@bnoordhuis bnoordhuis deleted the bjson branch August 11, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants