Array

Array

Typedefs

typedef void va_array

Functions

va_array* va_array_from_json(const void* json)
va_array* va_array_clone(const va_array* array)
void va_array_free(va_array* array)

Typedef Documentation

typedef void va_array

An array. Arrays can contain a variable number of dynamically typed elements. Dynamic typing comes with a performance penalty, which is why va_matrix is the de facto way of handling numeric data. Through the C interface, arrays are passed as opaque pointers that can be manipulated using the va_array_* functions.

Function Documentation

va_array* va_array_clone(const va_array* array)

Returns a deep copy of array of NULL if memory allocation fails.

void va_array_free(va_array* array)

Releases the memory allocated by array.

va_array* va_array_from_json(const void* json)

Creates an array by decoding the given JSON description.

Parameters
jsonUTF-8-encoded text or a va_string representing a JSON array.
Returns
An opaque pointer to a newly allocated array, or NULL if the call fails due to error in json or insufficient memory.
va_array* pArray = va_array_from_json("[1, 2, 3]");