Re: [PATCH 1/2] Make xdiff_outf_{init,release} interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brian Downing <bdowning@xxxxxxxxx> writes:

> @@ -103,6 +110,10 @@ int xdiff_outf(void *priv_, mmbuffer_t *mb, int nbuf)
>  	return 0;
>  }
>  
> +void xdiff_outf_release(void *priv_)
> +{
> +}
> +

It might make it more clear to have this function take a pointer to
"struct xdiff_emit_state", which is always the first member of the
callback private data structure.

Although I wish xdi_diff() could do the necessary clean-up immediately
before it returns (so that the caller did not have to do anything
special), it is not possible to do so cleanly, because there are "outf"
implementations other than xdiff_outf that do not even use "struct
xdiff_emit_state" in their callbacks.  So I think your patch makes sense.

Thanks.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux