Skip to content

Commit

Permalink
docs: add missing stdint includes
Browse files Browse the repository at this point in the history
PR-URL: #2728
Ref: #2726 (review)
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com> 
Signed-off-by: Athan Reines <kgryte@gmail.com>
  • Loading branch information
gunjjoshi and kgryte committed Aug 1, 2024
1 parent 9360e31 commit eb7f8ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/node_modules/@stdlib/math/base/napi/binary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,8 @@ When used, this macro should be used **instead of** `NAPI_MODULE`. The macro inc
Macro for registering a Node-API module exporting an interface for invoking a binary function accepting and returning signed 32-bit integers.
```c
#include <stdint.h>
static int32_t add( const int32_t x, const int32_t y ) {
return x + y;
}
Expand All @@ -642,6 +644,8 @@ When used, this macro should be used **instead of** `NAPI_MODULE`. The macro inc
Macro for registering a Node-API module exporting an interface for invoking a binary function accepting signed 32-bit integers and returning a double-precision floating-point number.

```c
#include <stdint.h>

static double add( const int32_t x, const int32_t y ) {
return x + y;
}
Expand Down Expand Up @@ -951,7 +955,7 @@ static double fcn( const int64_t x, const int64_t y ) {
// ...

// Register a Node-API module:
STDLIB_MATH_BASE_NAPI_MODULE_II_D( fcn );
STDLIB_MATH_BASE_NAPI_MODULE_LL_D( fcn );
```
The macro expects the following arguments:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
* @param fcn binary function
*
* @example
* #include <stdint.h>
*
* static int_32 add( const int_32 x, const int_32 y ) {
* return x + y;
* }
Expand Down Expand Up @@ -110,6 +112,8 @@
* @param fcn binary function
*
* @example
* #include <stdint.h>
*
* static double add( const int_32 x, const int_32 y ) {
* return x + y;
* }
Expand Down

1 comment on commit eb7f8ed

@stdlib-bot
Copy link
Contributor

Choose a reason for hiding this comment

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

Coverage Report

Package Statements Branches Functions Lines
math/base/napi/binary $\color{green}154/154$
$\color{green}+100.00\%$
$\color{green}5/5$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}154/154$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this push.

Please sign in to comment.