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

feat: add C implementation for math/base/assert/is-nonnegative-integer #1746

Merged
merged 6 commits into from
Mar 8, 2024
Merged

feat: add C implementation for math/base/assert/is-nonnegative-integer #1746

merged 6 commits into from
Mar 8, 2024

Conversation

gunjjoshi
Copy link
Member

@gunjjoshi gunjjoshi commented Mar 7, 2024

Resolves #1723

Description

Added C implementation for stdlib/math/base/assert/is-nonnegative-integer.

What is the purpose of this pull request?

This pull request:

  • adds C implementation for stdlib/math/base/assert/is-nonnegative-integer

Related Issues

Does this pull request have any related issues?

This pull request:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
@kgryte kgryte added Feature Issue or pull request for adding a new feature. Needs Review A pull request which needs code review. Math Issue or pull request specific to math functionality. C Issue involves or relates to C. labels Mar 7, 2024
@kgryte kgryte changed the title feat: Added C implementation for stdlib/math/base/assert/is-nonnegative-integer feat: add C implementation for math/base/assert/is-nonnegative-integer Mar 7, 2024
Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

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

Thanks, @gunjjoshi. Left a couple of comments. Looks like we need to update math/base/napi/unary OR you can manually handle the add-on interface. See, e.g., https://github.com/stdlib-js/stdlib/blob/develop/lib/node_modules/%40stdlib/math/base/assert/is-even/src/addon.c.

Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
Signed-off-by: GUNJ JOSHI <gunjjoshi8372@gmail.com>
@gunjjoshi
Copy link
Member Author

gunjjoshi commented Mar 7, 2024

Thanks, @gunjjoshi. Left a couple of comments. Looks like we need to update math/base/napi/unary OR you can manually handle the add-on interface. See, e.g., https://github.com/stdlib-js/stdlib/blob/develop/lib/node_modules/%40stdlib/math/base/assert/is-even/src/addon.c.

For now, I've manually handled the add-on interface.
However, I will try to make a separate PR adding D_X to math/base/napi/unary.
Thanks for pointing this out.

@gunjjoshi
Copy link
Member Author

Hey @kgryte @Planeshifter, any other suggestions on this ?

Signed-off-by: Athan <kgryte@gmail.com>
Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks, @gunjjoshi!

@kgryte kgryte removed the Needs Review A pull request which needs code review. label Mar 8, 2024
@kgryte kgryte merged commit 054472b into stdlib-js:develop Mar 8, 2024
7 checks passed
@gunjjoshi gunjjoshi deleted the is-nonnegative-integer branch March 10, 2024 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C Issue involves or relates to C. Feature Issue or pull request for adding a new feature. Math Issue or pull request specific to math functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC]: Add C implementation for @stdlib/math/base/assert/is-nonnegative-integer
2 participants