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

Re: PATCH: Remove unnecessary type casts

From: Karl Fogel <kfogel_at_localhost.localdomain>
Date: 2004-03-08 02:25:16 CET

Philip Martin <philip@codematters.co.uk> writes:
> Is it a good idea? The str parameter ends up getting cast to
> non-const inside svn_fs__set_dbt, do all the places that retrieve it
> treat it as const?

http://www.sleepycat.com/docs/api_c/dbt_class.html does not explicitly
say that dbt->data is always treated read-only when dbt is being used
as a key for a data retrieval. However, it's hard to imagine anything
else could be the case. Assuming that's true, then since BDB does not
share the same DBT instance for key and value, this means we're safe
in treating the keys as const even when the DB_USERMEM flag is set.

(Does this sound sane?)

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 8 02:43:37 2004

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.