On Wed, 9 Aug 2023 13:53:37 -0400 Stevie Alvarez <stevie.6strings@xxxxxxxxx> wrote: > +static int copy_traceeval_data_set(size_t size, struct traceeval_type *type, > + const union traceeval_data *orig, > + union traceeval_data **copy) > +{ > + size_t i; > + > + *copy = NULL; > + if (!size) > + return 1; > + > + *copy = calloc(size, sizeof(**copy)); > + if (!*copy) > + return -1; > + > + for (i = 0; i < size; i++) { > + if (copy_traceeval_data(type + i, orig + i, (*copy) + i)) > + goto fail; > + } > + > + return 1; > + > +fail: > + data_release(i, copy, type); > + return -1; > +} I think Ross mentioned this too, but we should have a copy() callback to allow things like the dyn events to be copied. -- Steve