On 04.09.2012 19:33, Stefan Küng wrote: > On 03.09.2012 22:21, Branko Čibej wrote: >> On 03.09.2012 22:16, Stefan Küng wrote: >>> On 03.09.2012 22:11, Branko Čibej wrote: >>>> Either that, or add a new API that creates a deep-copy of the >>>> in-memory >>>> svn_config_t structure, making this another way to avoid re-reading >>>> the >>>> config file for each thread and avoiding the hassle of managing a >>>> mutex. >>> >>> I'm in favor of implementing a deep copy API for this. I think that >>> would be the best solution. >> >> I find it to be the best option, too. Will you write a patch for that? > > Ahem: > apr_hash_copy > will do the trick: svn_config_t is a typedef for an apr_hash_t.
Really? That's strange; are you quite sure you're looking at the right code? subversion/libsvn_subr/config_impl.h says: struct svn_config_t { /* Table of cfg_section_t's. */ apr_hash_t *sections; /* Pool for hash tables, table entries and unexpanded values */ apr_pool_t *pool; /* Pool for expanded values -- this is separate, so that we can clear it when modifying the config data. */ apr_pool_t *x_pool; /* Indicates that some values in the configuration have been expanded. */ svn_boolean_t x_values; /* Temporary string used for lookups. (Using a stringbuf so that frequent resetting is efficient.) */ svn_stringbuf_t *tmp_key; /* Temporary value used for expanded default values in svn_config_get. (Using a stringbuf so that frequent resetting is efficient.) */ svn_stringbuf_t *tmp_value; /* Specifies whether section names are populated case sensitively. */ svn_boolean_t section_names_case_sensitive; }; > So it's already done :) Not even close, I'm afraid. -- Brane -- Certified & Supported Apache Subversion Downloads: http://www.wandisco.com/subversion/download