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

Re: Use ordinary C strings for filenames?

From: Greg Stein <gstein_at_lyra.org>
Date: 2000-11-13 22:21:23 CET

On Fri, Nov 10, 2000 at 06:23:10PM -0500, Jim Blandy wrote:
>
> While I'm at it...
>
> Since valid names in a Subversion filesystem may not contain the null
> character, it's not *necessary* to use svn_string_t for filename
> arguments to FS functions. APR, together with ANSI, provide a full
> set of primitives for dealing with standard null-terminated strings.
> And debuggers print them nicely.
>
> I never mutate a string the user passes in, so the fact that an
> svn_string_t knows its pool doesn't matter.
>
> Should I use `[const] char *' for name/path arguments to filesystem
> functions, instead of `svn_string_t'?

*PLEASE* use "const char *" for those names. I end up manufacturing
svn_string_t just to deal with the interface. And since you don't need it
anyhow...

[ of course, you may have already done this, but I have a lot of email to
  catch up on... ]

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:14 2006

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.