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

blarg. svn_wc_prop_get

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-03-30 11:28:48 CEST

The values returned by svn_wc_prop_get are somewhat bogified. Specifically,
they don't have a pool value in the svn_string_t.

I discovered this during the commit process. I called the get_func (which
goes thru a couple steps to get to svn_wc_prop_get), got a value bak, then
tried to append to it. BAM!

This brings up an issue: svn_wc_prop_get returns a value. It takes a pool. I
would presume that the value is allocated in the specified pool, and is then
available completely for my use (i.e. not shared with somebody else). That
being the case, I would further expect it to be a "real" value that I can
then manipulate.

An alternative point of view is "the return value is still private/held by
the function; make a copy if you want to muck with it."

I believe the latter POV is bogus, tho, as the function retains no state, so
why should it do so?

This would seem to be just a run of the mill buglet, but I think there are
also some underlying issues that could do with some review/rethink. (such as
the hash reading and the svn_pack_bytestring co-conspirator)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:26 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.