Skip to content

Commit 329589b

Browse files
committed
Add warnings
1 parent 963fbd2 commit 329589b

File tree

1 file changed

+9
-0
lines changed
  • lib/node_modules/@stdlib/ndarray/ctor/src

1 file changed

+9
-0
lines changed

lib/node_modules/@stdlib/ndarray/ctor/src/main.c

+9
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,7 @@ int8_t stdlib_ndarray_set_ptr_int8( uint8_t *idx, const int8_t v ) {
13001300
*
13011301
* - The function returns `-1` if unable to set an element and `0` otherwise.
13021302
* - The function requires a pointer to a data value `v` in order to provide a generic API supporting ndarrays having different data types.
1303+
* - The function has no way of determining whether `v` actually points to a memory address compatible with the underlying input ndarray data type. Accordingly, accessing **unowned** memory is possible, and this function **assumes** you know what you are doing.
13031304
*
13041305
* @param arr input ndarray
13051306
* @param sub ndarray subscripts
@@ -1319,6 +1320,7 @@ int8_t stdlib_ndarray_set( const struct ndarray *arr, const int64_t *sub, const
13191320
*
13201321
* ## Notes
13211322
*
1323+
* - The function does **not** verify that the type of `v` matches the underlying input ndarray data type, and, thus, overwriting **unowned** memory is possible. The function **assumes** that you know what you are doing.
13221324
* - The function returns `-1` if unable to set an element and `0` otherwise.
13231325
*
13241326
* @param arr input ndarray
@@ -1339,6 +1341,7 @@ int8_t stdlib_ndarray_set_float64( const struct ndarray *arr, const int64_t *sub
13391341
*
13401342
* ## Notes
13411343
*
1344+
* - The function does **not** verify that the type of `v` matches the underlying input ndarray data type, and, thus, overwriting **unowned** memory is possible. The function **assumes** that you know what you are doing.
13421345
* - The function returns `-1` if unable to set an element and `0` otherwise.
13431346
*
13441347
* @param arr input ndarray
@@ -1359,6 +1362,7 @@ int8_t stdlib_ndarray_set_float32( const struct ndarray *arr, const int64_t *sub
13591362
*
13601363
* ## Notes
13611364
*
1365+
* - The function does **not** verify that the type of `v` matches the underlying input ndarray data type, and, thus, overwriting **unowned** memory is possible. The function **assumes** that you know what you are doing.
13621366
* - The function returns `-1` if unable to set an element and `0` otherwise.
13631367
*
13641368
* @param arr input ndarray
@@ -1379,6 +1383,7 @@ int8_t stdlib_ndarray_set_uint64( const struct ndarray *arr, const int64_t *sub,
13791383
*
13801384
* ## Notes
13811385
*
1386+
* - The function does **not** verify that the type of `v` matches the underlying input ndarray data type, and, thus, overwriting **unowned** memory is possible. The function **assumes** that you know what you are doing.
13821387
* - The function returns `-1` if unable to set an element and `0` otherwise.
13831388
*
13841389
* @param arr input ndarray
@@ -1399,6 +1404,7 @@ int8_t stdlib_ndarray_set_int64( const struct ndarray *arr, const int64_t *sub,
13991404
*
14001405
* ## Notes
14011406
*
1407+
* - The function does **not** verify that the type of `v` matches the underlying input ndarray data type, and, thus, overwriting **unowned** memory is possible. The function **assumes** that you know what you are doing.
14021408
* - The function returns `-1` if unable to set an element and `0` otherwise.
14031409
*
14041410
* @param arr input ndarray
@@ -1419,6 +1425,7 @@ int8_t stdlib_ndarray_set_uint32( const struct ndarray *arr, const int64_t *sub,
14191425
*
14201426
* ## Notes
14211427
*
1428+
* - The function does **not** verify that the type of `v` matches the underlying input ndarray data type, and, thus, overwriting **unowned** memory is possible. The function **assumes** that you know what you are doing.
14221429
* - The function returns `-1` if unable to set an element and `0` otherwise.
14231430
*
14241431
* @param arr input ndarray
@@ -1439,6 +1446,7 @@ int8_t stdlib_ndarray_set_int32( const struct ndarray *arr, const int64_t *sub,
14391446
*
14401447
* ## Notes
14411448
*
1449+
* - The function does **not** verify that the type of `v` matches the underlying input ndarray data type, and, thus, overwriting **unowned** memory is possible. The function **assumes** that you know what you are doing.
14421450
* - The function returns `-1` if unable to set an element and `0` otherwise.
14431451
*
14441452
* @param arr input ndarray
@@ -1459,6 +1467,7 @@ int8_t stdlib_ndarray_set_uint16( const struct ndarray *arr, const int64_t *sub,
14591467
*
14601468
* ## Notes
14611469
*
1470+
* - The function does **not** verify that the type of `v` matches the underlying input ndarray data type, and, thus, overwriting **unowned** memory is possible. The function **assumes** that you know what you are doing.
14621471
* - The function returns `-1` if unable to set an element and `0` otherwise.
14631472
*
14641473
* @param arr input ndarray

0 commit comments

Comments
 (0)