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

attn: lundblad; FSFS gcc dependency

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2005-04-05 18:08:11 CEST

r13906 added the following line of code:

+ struct commit_baton cb = { new_rev_p, fs, txn };

Initializing an aggregate object with non-constant data is a gcc-ism
(also supported by C99, perhaps, but not C89).

On a more subjective note, thunk abstractions in C are really
cumbersome. I think it would clearer and more concise to duplicate
the svn_fs_fs__with_write_lock logic in the three places it's needed,
like so:

  svn_fs_fs__commit (stuff, pool)
  {
    apr_pool_t *subpool = svn_pool_create (pool);
    svn_error_t *err;
 
    SVN_ERR (get_write_lock (fs, subpool));
  
    err = commit_body (stuff, pool);

    svn_pool_destroy (subpool);

    return err;
  }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 5 18:08:47 2005

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