<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Aug 16, 2018 at 12:30 AM Thomas Helland <<a href="mailto:thomashelland90@gmail.com">thomashelland90@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2018-08-15 23:56 GMT+02:00 Caio Marcelo de Oliveira Filho<br>
<<a href="mailto:caio.oliveira@intel.com" target="_blank">caio.oliveira@intel.com</a>>:<br>
> ---<br>
> src/util/u_dynarray.h | 9 +++++++++<br>
> 1 file changed, 9 insertions(+)<br>
><br>
> diff --git a/src/util/u_dynarray.h b/src/util/u_dynarray.h<br>
> index dcbbc06d161..4920fe04b67 100644<br>
> --- a/src/util/u_dynarray.h<br>
> +++ b/src/util/u_dynarray.h<br>
> @@ -102,6 +102,15 @@ util_dynarray_resize(struct util_dynarray *buf, unsigned newsize)<br>
> return p;<br>
> }<br>
><br>
> +static inline void<br>
> +util_dynarray_clone(struct util_dynarray *buf, struct util_dynarray *mem_ctx,<br>
<br>
I think we should keep the mem_ctx a void *.<br>
Apart from that this patch is:<br></blockquote><div><br></div><div>Yes, please. With that fixed,</div><div><br></div><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Reviewed-by: Thomas Helland <<a href="mailto:thomashelland90@gmail.com" target="_blank">thomashelland90@gmail.com</a>><br>
<br>
> + struct util_dynarray *from_buf)<br>
> +{<br>
> + util_dynarray_init(buf, mem_ctx);<br>
> + util_dynarray_resize(buf, from_buf->size);<br>
> + memcpy(buf->data, from_buf->data, from_buf->size);<br>
> +}<br>
> +<br>
> static inline void *<br>
> util_dynarray_grow(struct util_dynarray *buf, int diff)<br>
> {<br>
> --<br>
> 2.18.0<br>
><br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div></div>