mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 15:43:01 +00:00 
			
		
		
		
	| @@ -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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose