Skip to content

Commit a80835b

Browse files
committed
refactor: declare parameters and pointer as const
1 parent 1488b3d commit a80835b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/node_modules/@stdlib/ndarray/base/broadcast-shapes/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ The function accepts the following arguments:
311311
- **out**: `[out] int64_t*` output shape array.
312312

313313
```c
314-
int8_t stdlib_ndarray_broadcast_shapes( int64_t M, int64_t *shapes[], const int64_t ndims[], int64_t *out );
314+
int8_t stdlib_ndarray_broadcast_shapes( const int64_t M, const int64_t *shapes[], const int64_t ndims[], int64_t *out );
315315
```
316316
317317
If successful, the function returns `0`; otherwise, the function returns `-1` (e.g., due to incompatible shapes).

lib/node_modules/@stdlib/ndarray/base/broadcast-shapes/include/stdlib/ndarray/base/broadcast_shapes.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ extern "C" {
3131
/**
3232
* Broadcasts array shapes to a single shape.
3333
*/
34-
int8_t stdlib_ndarray_broadcast_shapes( int64_t M, int64_t *shapes[], int64_t ndims[], int64_t *out );
34+
int8_t stdlib_ndarray_broadcast_shapes( const int64_t M, const int64_t *shapes[], const int64_t ndims[], int64_t *out );
3535

3636
#ifdef __cplusplus
3737
}

lib/node_modules/@stdlib/ndarray/base/broadcast-shapes/src/main.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
* int64_t out[] = { 0, 0, 0, 0 };
5656
* int8_t status = stdlib_ndarray_broadcast_shapes( 2, shapes, ndims, out );
5757
*/
58-
int8_t stdlib_ndarray_broadcast_shapes( int64_t M, int64_t *shapes[], const int64_t ndims[], int64_t *out ) {
58+
int8_t stdlib_ndarray_broadcast_shapes( const int64_t M, const int64_t *shapes[], const int64_t ndims[], int64_t *out ) {
5959
int64_t dim;
60-
int64_t *sh;
60+
const int64_t *sh;
6161
int64_t n1;
6262
int64_t n2;
6363
int64_t d;

0 commit comments

Comments
 (0)