summaryrefslogtreecommitdiffstats
path: root/src/util/u_dynarray.h
Commit message (Collapse)AuthorAgeFilesLines
* u_dynarray: add util_dynarray_grow_capQiang Yu2019-04-111-6/+17
| | | | | | | | | | | | | This is for the case that user only know a max size it wants to append to the array and enlarge the array capacity before writing into it. v2: - rename newsize to newcap - rename util_dynarray_enlarge to util_dynarray_grow_cap Signed-off-by: Qiang Yu <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* util: s/0/NULL/ for pointerEric Engestrom2018-10-301-1/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* util: Add foreach_reverse for dynarrayCaio Marcelo de Oliveira Filho2018-10-151-0/+6
| | | | | | | | | Useful to walk the array removing elements by swapping them with the last element. v2: Change iteration to make sure we never underflow. (Jason) Reviewed-by: Jason Ekstrand <[email protected]>
* util: Add macro to get number of elements in dynarrayCaio Marcelo de Oliveira Filho2018-09-211-0/+1
| | | | Reviewed-by: Christian Gmeiner <[email protected]>
* util/dynarray: add a clone functionCaio Marcelo de Oliveira Filho2018-08-221-0/+9
| | | | | | | v2: Fix mem_ctx parameter type. (Thomas) Reviewed-by: Thomas Helland <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* util: include string.h in u_dynarray.hBrian Paul2018-01-171-0/+1
| | | | | | To get memset() prototype. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/util: add util_dynarray_clear() helperSamuel Pitoiset2017-06-181-0/+6
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa/util: add new util_dynarray_delete_unordered helperSamuel Pitoiset2017-06-141-0/+14
| | | | | | | | This helper function will be used for managing dynamic arrays of resident texture/image handles. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* u_dynarray: fix coverity warning about ignoring return value from rerallocDave Airlie2017-06-131-1/+1
| | | | | | | | >>> Ignoring storage allocated by "reralloc_size(buf->mem_ctx, buf->data, buf->size)" leaks it. Reviewed-by: Thomas Helland<[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* util: Add extern c to u_dynarray.hThomas Helland2017-06-071-0/+8
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* util: Port nir_array functionality to u_dynarrayThomas Helland2017-06-071-10/+37
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* util: Remove unused includes and convert to lower-case memory opsThomas Helland2017-06-071-15/+12
| | | | | | | | Also, prepare for the next commit by correcting some coding style changes. This should be all non-functional changes. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* util: Move u_dynarray to src/utilThomas Helland2017-06-071-0/+114
This will be used as the basis for unification Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>