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

Add N-API support #217

Merged
merged 7 commits into from
Apr 22, 2021
Merged

Add N-API support #217

merged 7 commits into from
Apr 22, 2021

Conversation

sergiou87
Copy link
Member

@sergiou87 sergiou87 commented Apr 15, 2021

Update registry.js to support N-API. I basically ran the conversion tool and made changes on top of that.

The bulk of the work was about changing part of the syntax, and removing references to V8 in favor of the new N-API replacements.

I also found we were using the wrong type for DWORD values, which could cause issues with high values.

}
else if (wcscmp(valueType, L"REG_DWORD") == 0)
{
uint32_t dwordData = info[4].ToNumber().Uint32Value();
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the only change I made with respect the original behavior: we were using int, but DWORD is an unsigned integer of 32bits, so using uint32_t is much more correct.

@sergiou87 sergiou87 requested a review from tidy-dev April 15, 2021 14:32
@sergiou87 sergiou87 changed the title [WIP] Add N-API support Add N-API support Apr 15, 2021
Copy link
Contributor

@tidy-dev tidy-dev left a comment

Choose a reason for hiding this comment

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

@sergiou87 sergiou87 merged commit d2ccfae into master Apr 22, 2021
@sergiou87 sergiou87 deleted the switch-to-n-api branch April 22, 2021 16:42
@sergiou87 sergiou87 mentioned this pull request May 14, 2021
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