Skip to content

Commit eb7f8ed

Browse files
gunjjoshikgryte
andauthored
docs: add missing stdint includes
PR-URL: #2728 Ref: #2726 (review) Co-authored-by: Athan Reines <[email protected]> Reviewed-by: Athan Reines <[email protected]> Signed-off-by: Athan Reines <[email protected]>
1 parent 9360e31 commit eb7f8ed

File tree

2 files changed

+9
-1
lines changed
  • lib/node_modules/@stdlib/math/base/napi/binary

2 files changed

+9
-1
lines changed

Diff for: lib/node_modules/@stdlib/math/base/napi/binary/README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,8 @@ When used, this macro should be used **instead of** `NAPI_MODULE`. The macro inc
621621
Macro for registering a Node-API module exporting an interface for invoking a binary function accepting and returning signed 32-bit integers.
622622

623623
```c
624+
#include <stdint.h>
625+
624626
static int32_t add( const int32_t x, const int32_t y ) {
625627
return x + y;
626628
}
@@ -642,6 +644,8 @@ When used, this macro should be used **instead of** `NAPI_MODULE`. The macro inc
642644
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.
643645
644646
```c
647+
#include <stdint.h>
648+
645649
static double add( const int32_t x, const int32_t y ) {
646650
return x + y;
647651
}
@@ -951,7 +955,7 @@ static double fcn( const int64_t x, const int64_t y ) {
951955
// ...
952956
953957
// Register a Node-API module:
954-
STDLIB_MATH_BASE_NAPI_MODULE_II_D( fcn );
958+
STDLIB_MATH_BASE_NAPI_MODULE_LL_D( fcn );
955959
```
956960

957961
The macro expects the following arguments:

Diff for: lib/node_modules/@stdlib/math/base/napi/binary/include/stdlib/math/base/napi/binary.h

+4
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
7070
* @param fcn binary function
7171
*
7272
* @example
73+
* #include <stdint.h>
74+
*
7375
* static int_32 add( const int_32 x, const int_32 y ) {
7476
* return x + y;
7577
* }
@@ -110,6 +112,8 @@
110112
* @param fcn binary function
111113
*
112114
* @example
115+
* #include <stdint.h>
116+
*
113117
* static double add( const int_32 x, const int_32 y ) {
114118
* return x + y;
115119
* }

0 commit comments

Comments
 (0)