Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Export bjson module #478

Merged
merged 3 commits into from
Aug 11, 2024
Merged

Export bjson module #478

merged 3 commits into from
Aug 11, 2024

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
50 checks passed
@bnoordhuis bnoordhuis deleted the bjson branch August 11, 2024 09:04
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants