[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Fluff in delta combiner interface?

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2004-04-23 20:14:13 CEST

I'm looking at svn_txdelta__compose_windows and the way it's used in
libsvn_fs, and I'm puzzled by a few things.

  (1) It appears to have special handling for passing a second window
      of NULL. Is there any reason for this?

  (2) There appear to be three redundant ways to check if the first
      window is unnecessary:

      - The caller can check whether (window_B->src_ops == 0). This
        seems most desirable, because you can avoid the effort of
        reading in the first window. libsvn_fs does this.

      - svn_txdelta__compose_windows() returns NULL.

      - svn_txdelta__compose_windows() sets context->use_second to
        TRUE.

      In addition to doing its own check beforehand, libsvn_fs checks
      if the latter two conditions are true and does something
      potentially appropriate, but as far as I can tell, this case can
      never happen.

I'd like to punt the context argument and the potential for returning
NULL, and assume that the caller will check window_B->src_ops. Since
this is an internal interface, there shouldn't be an API compatibility
issue. Am I missing anything?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 23 20:14:50 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.