Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update DecodedResultsTsType to use bigint in Emscripten binding (fixes #33). #34

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/clp_ffi_js/ir/StreamReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ EMSCRIPTEN_BINDINGS(ClpStreamReader) {
.value("STRUCTURED", clp_ffi_js::ir::StreamType::Structured)
.value("UNSTRUCTURED", clp_ffi_js::ir::StreamType::Unstructured);
emscripten::register_type<clp_ffi_js::ir::DecodedResultsTsType>(
"Array<[string, number, number, number]>"
"Array<[string, bigint, number, number]>"
Copy link
Member Author

Choose a reason for hiding this comment

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

Note the behaviour with logEventNum of type size_t is different: #33 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

Should we change (perhaps in another PR) the log event indices into uint32_t? I feel like having more than 4B log events in a file is unlikely.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should we change (perhaps in another PR) the log event indices into uint32_t?

Let's first investigate the behaviour after setting -sMEMORY64=1. If the underlying type of size_t changes to 64 bit unsigned, I think it makes sense to always use uint32_t.

);
emscripten::register_type<clp_ffi_js::ir::FilteredLogEventMapTsType>("number[] | null");
emscripten::class_<clp_ffi_js::ir::StreamReader>("ClpStreamReader")
Expand Down
Loading