Skip to content

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

Merged
kgryte merged 6 commits intostdlib-js:developfrom
gunjjoshi:is-nonnegative-integer
Mar 8, 2024
Merged

feat: add C implementation for math/base/assert/is-nonnegative-integer#1746
kgryte merged 6 commits intostdlib-js:developfrom
gunjjoshi:is-nonnegative-integer

Conversation

@gunjjoshi
Copy link
Copy Markdown
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
Comment thread lib/node_modules/@stdlib/math/base/assert/is-nonnegative-integer/src/addon.c Outdated
Comment thread lib/node_modules/@stdlib/math/base/assert/is-nonnegative-integer/src/main.c Outdated
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

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

Comment thread lib/node_modules/@stdlib/math/base/assert/is-nonnegative-integer/src/main.c Outdated
Signed-off-by: Athan <kgryte@gmail.com>
Copy link
Copy Markdown
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
@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