Add documentation about array utilities

This commit is contained in:
retropikzel 2025-04-07 07:31:29 +03:00
parent 3467a3356a
commit 16bb63582d
1 changed files with 19 additions and 0 deletions

View File

@ -62,6 +62,11 @@ conforming to some specification.
- [pffi-struct-offset-get](#pffi-struct-offset-get) - [pffi-struct-offset-get](#pffi-struct-offset-get)
- [pffi-struct-get](#pffi-struct-get) - [pffi-struct-get](#pffi-struct-get)
- [pffi-struct-set!](#pffi-struct-set!) - [pffi-struct-set!](#pffi-struct-set!)
- [pffi-array-allocate](#pffi-array-allocate)
- [pffi-array?](#pffi-is-array)
- [pffi-pointer->array](#pffi-pointer-to-array)
- [pffi-array-get](#pffi-array-get)
- [pffi-array-set!](#pffi-array-set!)
- [pffi-list->array](#pffi-list-to-array) - [pffi-list->array](#pffi-list-to-array)
- [pffi-array->list](#pffi-array-to-list) - [pffi-array->list](#pffi-array-to-list)
- [pffi-define](#pffi-define) - [pffi-define](#pffi-define)
@ -461,30 +466,44 @@ Returns the value of the givens struct member.
Sets the value of the givens struct member. It is up to you to make sure that the type of value is Sets the value of the givens struct member. It is up to you to make sure that the type of value is
correct. correct.
#### pffi-array-allocate <a name="pffi-array-allocate"></a>
**pffi-array-allocate** type size **pffi-array-allocate** type size
Allocates pointer array of given type and size. Allocates pointer array of given type and size.
#### pffi-array? <a name="pffi-is-array"></a>
**pffi-array?** object **pffi-array?** object
Returns #t of given object is array, #f otherwise. Returns #t of given object is array, #f otherwise.
#### pffi-pointer->array <a name="pffi-pointer->array"></a>
**pffi-pointer->array** pointer type size **pffi-pointer->array** pointer type size
Converts given pointer to an array of giben type and size. Converts given pointer to an array of giben type and size.
#### pffi-array-get <a name="pffi-array-get"></a>
**pffi-array-get** array index **pffi-array-get** array index
Returns the value of given index from given array. Returns the value of given index from given array.
#### pffi-array-set! <a name="pffi-array-set!"></a>
**pffi-array-set!** array index value **pffi-array-set!** array index value
Sets the given value of given index in given array. Sets the given value of given index in given array.
#### pffi-list->array <a name="pffi-list-to-array"></a>
**pffi-list->array** type list **pffi-list->array** type list
Converts given list into C array of given type. Converts given list into C array of given type.
#### pffi-array->list <a name="pffi-array-to-list"></a>
**pffi-array->list** type list length **pffi-array->list** type list length
Converts given C array into list of given type and length. Converts given C array into list of given type and length.