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

Re: [PATCH] BDB verbose errors

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2004-08-07 21:27:44 CEST

On Sat, 2004-08-07 at 14:54, Max Bowsher wrote:
> Opinions?
> 1. Get SleepyCat to legitimize using a void* errpfx with BDB's errcall
> feature?
> 2. Adopt the kludge outlined above?
> 3. Something else?

I'd go with #2 for now. It's the best of several bad solutions.

(BDB's documentation promises not to copy the error prefix, but to
instead maintain a reference to it so that the caller can change what
the passed-in pointer points to. So a future release of BDB can't
really break the kludge without breaking their API.)

Your log message and patch were word-wrapped. If you can't convince
Outlook to avoid wrapping text (in Evolution, you change a little tab
from "Normal" to "Preformat"), then maybe you can include it as a
plain-text attachment?

The patch looks functionally correct but contains several style issues:

+ child_errors = bfd->bdb_errcall_pending_errors;
+ bfd->bdb_errcall_pending_errors = NULL;
+ svn_error_t *err = svn_error_create (bdb_err_to_apr_err (db_err),
+ child_errors, NULL);

Don't use mixed declarations and code; it's not valid C89.

+ base_fs_data_t *bfd = (base_fs_data_t*) pfx_baton;

Put space before asterix.

+ if (bfd->bdb_errcall_pending_errors)
+ svn_error_compose(bfd->bdb_errcall_pending_errors, new_err);

Indent by two spaces, not four. Put space before open paren.

+ if (bfd->user_errcall_handler)
+ bfd->user_errcall_handler(0, msg);

Put space before open paren. Use NULL instead of 0 for pointer
argument.

+ bfd->env->set_errpfx (bfd->env, (char*)bfd);

Put space before asterix and after close paren of cast. (Moot after you
adopt the kludge, of course.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Aug 7 21:27:56 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.