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

Re: [PATCH] add pool pointer to svn_string_t

From: Jim Blandy <jimb_at_savonarola.red-bean.com>
Date: 2000-10-12 19:15:36 CEST

The real question is, what kind of data are the strings carrying?

If we're using them to carry things which we know can't contain null
characters, then I agree it's overkill. I don't know if `strlen'
would account for a significant portion of Subversion's runtime, but
if not, then char * is preferable.

But I would like to keep as much of Subversion eight-bit clean as
reasonable. Property values *must* be able to hold nulls, for
example. Certainly, anything dealing with file contents must be
transparent. That was the original motivation for svn_string_t, and
they still seem appropriate in that context.

But I suspect that most of the uses of svn_string_t have to do with
filenames, which aren't allowed to contain null characters. For
those, char * would work fine. It might be a nice simplification of
the code.

However, wouldn't char * have exactly the same problem that Joe's
original patch was trying to address? You need to specify a pool
every time you resize them, and you might resize them into a different
pool.
Received on Sat Oct 21 14:36:10 2006

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