KrkValueArray Struct Reference
Flexible vector of stack references. More...
#include <value.h>
Public Member Functions | |
| void | krk_initValueArray (KrkValueArray *array) |
| Initialize a value array. More... | |
| void | krk_writeValueArray (KrkValueArray *array, KrkValue value) |
| Add a value to a value array. More... | |
| void | krk_freeValueArray (KrkValueArray *array) |
| Release relesources used by a value array. More... | |
Data Fields | |
| size_t | capacity |
| size_t | count |
| KrkValue * | values |
Detailed Description
Flexible vector of stack references.
Value Arrays provide a resizable collection of values and are the backbone of lists and tuples.
Member Function Documentation
◆ krk_freeValueArray()
| void krk_freeValueArray | ( | KrkValueArray * | array | ) |
Release relesources used by a value array.
Frees the storage associated with a given value array and resets its capacity and count. Does not directly free resources associated with heap objects referenced by the values in this array: The GC is responsible for taking care of that.
- Parameters
-
array Array to release.
◆ krk_initValueArray()
| void krk_initValueArray | ( | KrkValueArray * | array | ) |
◆ krk_writeValueArray()
| void krk_writeValueArray | ( | KrkValueArray * | array, |
| KrkValue | value | ||
| ) |
Field Documentation
◆ capacity
◆ count
◆ values
| KrkValue* KrkValueArray::values |
The documentation for this struct was generated from the following file:
- src/kuroko/value.h