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

Re: svn commit: r31233 - branches/kwallet/subversion/libsvn_subr

From: Philip Martin <philip_at_codematters.co.uk>
Date: Fri, 16 May 2008 19:10:27 +0100

"Arfrever Frehtes Taifersar Arahesis" <arfrever.fta_at_gmail.com> writes:

>>> - svn_dso_load(&dso, libname);
>>> + svn_error_clear(svn_dso_load(&dso, libname));
>>> if (dso)
>>> {
>>> if (! apr_dso_sym(&provider_symbol, dso, funcname))
>>
>> If svn_dso_load returns an error you cannot assume dso has a value you
>> can check. Further, simply ignoring all errors makes it hard for
>> users to debug problems with dynamic loading.
>
> /**
> * Attempt to load @a libname, returning it in @a dso.
> *
> * If @a libname cannot be loaded set @a dso to NULL and return
> * @c SVN_NO_ERROR.
> *
> * @note Due to pool lifetime issues DSOs are all loaded into a global
> * pool, so you must be certain that there is a bounded number of
> * them that will ever be loaded by the system, otherwise you will
> * leak memory.
> *
> * @since New in 1.4.0.
> */
> svn_error_t *svn_dso_load(apr_dso_handle_t **dso, const char *libname);

Was your mail incomplete, I'm not sure what point you are trying to
make?

If the function returns SVN_NO_ERROR then you can check dso. Can the
function return something otherthan SVN_NO_ERROR? What's the point of
returning an svn_error_t if it is always SVN_NO_ERROR? If it does
return something other than SVN_NO_ERROR then you cannot check dso.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-16 20:10:48 CEST

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.