[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: Karl Fogel <kfogel_at_galois.collab.net>
Date: 2000-10-13 04:19:21 CEST

I actually still prefer to use svn_string_t even when carrying plain
old c-string data, because:

Subversion strings provide that one extra level of indirection -- by
wrapping the data pointer, we get resizes that work in the happy way.
Also, now strings store their pools, which may help readability and
prevent allocation-lifetime bugs.

Were we to use (char *) instead, and use the apr string functions
everywhere, then things like svn_path_*() wouldn't be able to
side-effect the string's data. So we'd probably end up with
return-by-reference arguments where we currently don't need them, or
else values would have to get passed up call chains in order to
satisfy someone's original assignment statement.

Even post-M1, I'd like to keep using svn_string_t as we have been,
unless a majority of developers feel strongly about switching.

-K
Received on Sat Oct 21 14:36:11 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.