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

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

 



bdowning@xxxxxxxxx (Brian Downing) writes:

>> 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.
>
> Well, I could do something like:
>
> 	if (xecb->outf == xdiff_outf)
> 		/* xdiff_outf cleanup */
>
> at the end of xdi_diff, but that's... kind of horrible I think.

Yeah, that is ugly, and that is why I said I think your patch makes sense.

> For that matter, I could just make an xdi_outf_diff function that would
> take the state in addition to the other xdi_diff arguments and go ahead
> and set it up, do the diff, and tear it down in one step.  Maybe that
> would be better if it works for everywhere this style of diff needs to
> be called.

Yeah, most of the xdi_diff() callers do use the stock outf so it would
make sense.
--
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