mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 10:08:08 +02:00
Instead of util_dynarray_init(&dynarray, NULL), just use
UTIL_DYNARRAY_INIT instead. This is more ergonomic.
Via Coccinelle patch:
@@
identifier dynarray;
@@
-struct util_dynarray dynarray = {0};
-util_dynarray_init(&dynarray, NULL);
+struct util_dynarray dynarray = UTIL_DYNARRAY_INIT;
@@
identifier dynarray;
@@
-struct util_dynarray dynarray;
-util_dynarray_init(&dynarray, NULL);
+struct util_dynarray dynarray = UTIL_DYNARRAY_INIT;
@@
expression dynarray;
@@
-util_dynarray_init(&(dynarray), NULL);
+dynarray = UTIL_DYNARRAY_INIT;
@@
expression dynarray;
@@
-util_dynarray_init(dynarray, NULL);
+(*dynarray) = UTIL_DYNARRAY_INIT;
Followed by sed:
bash -c "find . -type f -exec sed -i -e 's/util_dynarray_init(&\(.*\), NULL)/\1 = UTIL_DYNARRAY_INIT/g' \{} \;"
bash -c "find . -type f -exec sed -i -e 's/util_dynarray_init( &\(.*\), NULL )/\1 = UTIL_DYNARRAY_INIT/g' \{} \;"
bash -c "find . -type f -exec sed -i -e 's/util_dynarray_init(\(.*\), NULL)/*\1 = UTIL_DYNARRAY_INIT/g' \{} \;"
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38189>
|
||
|---|---|---|
| .. | ||
| tests | ||
| agx_abi.h | ||
| agx_bg_eot.c | ||
| agx_bg_eot.h | ||
| agx_bo.c | ||
| agx_bo.h | ||
| agx_border.c | ||
| agx_device.c | ||
| agx_device.h | ||
| agx_device_virtio.c | ||
| agx_device_virtio.h | ||
| agx_helpers.h | ||
| agx_linker.c | ||
| agx_linker.h | ||
| agx_nir_format_helpers.h | ||
| agx_nir_lower_msaa.c | ||
| agx_nir_lower_sample_intrinsics.c | ||
| agx_nir_lower_tilebuffer.c | ||
| agx_nir_lower_uvs.c | ||
| agx_nir_lower_vbo.c | ||
| agx_nir_lower_vbo.h | ||
| agx_nir_prolog_epilog.c | ||
| agx_ppp.h | ||
| agx_scratch.c | ||
| agx_scratch.h | ||
| agx_tilebuffer.c | ||
| agx_tilebuffer.h | ||
| agx_usc.h | ||
| agx_uvs.h | ||
| agx_va.c | ||
| asahi_proto.h | ||
| decode.c | ||
| decode.h | ||
| dyld_interpose.h | ||
| meson.build | ||
| pool.c | ||
| pool.h | ||
| wrap.c | ||