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

RE: [PATCH] An svn_fspath__* API for '/'-prefixed paths

From: Bert Huijben <bert_at_qqmail.nl>
Date: Thu, 18 Nov 2010 20:27:39 +0100

> -----Original Message-----
> From: Stefan Sperling [mailto:stsp_at_elego.de]
> Sent: donderdag 18 november 2010 19:40
> To: Julian Foad
> Cc: dev_at_subversion.apache.org
> Subject: Re: [PATCH] An svn_fspath__* API for '/'-prefixed paths
>
> On Thu, Nov 18, 2010 at 06:29:56PM +0000, Julian Foad wrote:
> > Any thoughts or concerns about this patch to add a path manipulation
> API
> > for '/fs/relative/style' aka '/repo/relative/style' paths ...
>
> > +char *
> > +svn_fspath__join(const char *fspath,
> > + const char *relpath,
> > + apr_pool_t *result_pool)
> > +{
> > + assert(svn_fspath__is_canonical(fspath, result_pool));
>
> Use SVN_ERR_ASSERT_NO_RETURN() instead of assert()?

We use assert() for the is canonical check in most svn_(dirent|uri|relpath)
functions, to automatically remove these checks in non-maintainer/non-DEBUG
builds. The functions can handle some canonical paths just fine, but we take
the performance penalty of checking them in maintainer builds.

        Bert
>
> > + assert(svn_relpath_is_canonical(relpath, result_pool));
> > +
> > + return svn_uri_join(fspath, relpath, result_pool);
> > +}
Received on 2010-11-18 20:28:21 CET

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.