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

fix: variable type declarations in math/base/assert/int32-is-odd #1935

Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ out = stdlib_base_int32_is_odd( -2 );

The function accepts the following arguments:

- **x**: `[in] double` input value.
- **x**: `[in] int32_t` input value.

```c
bool stdlib_base_int32_is_odd( const double x );
bool stdlib_base_int32_is_odd( const int32_t x );
```

</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var addon = require( './../src/addon.node' );
* Tests if a 32-bit integer is odd.
*
* @private
* @param {number} x - value to test
* @param {integer32} x - value to test
Pranavchiku marked this conversation as resolved.
Show resolved Hide resolved
* @returns {boolean} boolean indicating whether the number is odd
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
return NULL;
}

double x;
status = napi_get_value_double( env, argv[ 0 ], &x );
int32_t x;
status = napi_get_value_int32( env, argv[ 0 ], &x );
assert( status == napi_ok );

bool result = stdlib_base_int32_is_odd( x );
Expand Down
Loading