1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-26 08:20:27 +00:00

array.c docstrings

Added some backticks around code in docstrings to distinguish from prose.
This commit is contained in:
John Gabriele 2022-04-17 19:35:57 -04:00 committed by GitHub
parent 0d1a5c621d
commit be24592bc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,7 +125,7 @@ Janet janet_array_peek(JanetArray *array) {
JANET_CORE_FN(cfun_array_new,
"(array/new capacity)",
"Creates a new empty array with a pre-allocated capacity. The same as "
"(array) but can be more efficient if the maximum size of an array is known.") {
"`(array)` but can be more efficient if the maximum size of an array is known.") {
janet_fixarity(argc, 1);
int32_t cap = janet_getinteger(argv, 0);
JanetArray *array = janet_array(cap);
@ -194,7 +194,7 @@ JANET_CORE_FN(cfun_array_push,
JANET_CORE_FN(cfun_array_ensure,
"(array/ensure arr capacity growth)",
"Ensures that the memory backing the array is large enough for `capacity` "
"items at the given rate of growth. Capacity and growth must be integers. "
"items at the given rate of growth. `capacity` and `growth` must be integers. "
"If the backing capacity is already enough, then this function does nothing. "
"Otherwise, the backing memory will be reallocated so that there is enough space.") {
janet_fixarity(argc, 3);