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

JsArray::new() takes a usize #988

Merged
merged 1 commit into from
Jun 2, 2023
Merged

JsArray::new() takes a usize #988

merged 1 commit into from
Jun 2, 2023

Conversation

dherman
Copy link
Collaborator

@dherman dherman commented May 27, 2023

From the list of remaining breaking changes, this PR implements the one and only remaining case where the Neon API uses a u32 but should use a usize: JsArray::new().

I did an audit of all other occurrences of u32 in the codebase and all the remaining instances are fine:

  • Object indexed properties -- the JS semantics explicitly defines this for u32 only
  • JsArray::len() -- Node-API exposes this as u32
  • ref/unref -- Node-API exposes this as u32
  • Node-API version -- Node-API exposes this as u32
  • Finalize implementation for u32 -- this is just predefined on a bunch of Rust primitive types
  • typed arrays -- u32 is one of the supported typed array types
  • lifecycle instance ID -- implementation detail

@dherman dherman requested a review from kjvalencik May 27, 2023 19:19
@dherman dherman merged commit dd534ac into main Jun 2, 2023
@dherman dherman deleted the array-new-usize branch June 2, 2023 02:48
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