Madan U S wrote:
>> @@ -242,7 +245,10 @@
>> = apr_hash_get(atts, SVN_WC__ENTRY_ATTR_URL, APR_HASH_KEY_STRING);
>>
>> if (entry->url)
>> - *modify_flags |= SVN_WC__ENTRY_MODIFY_URL;
>> + {
>> + *modify_flags |= SVN_WC__ENTRY_MODIFY_URL;
>> + entry->url = apr_pstrdup(pool, entry->url);
>
> sorry, I dont understand why this is done... could you pl. explain this,
> lundblad? (There are other similar usages of apr_pstrdup() in the rest
> of the diff, but am taking this as an example)
Now that Peter made the bulk of this entry cache reading stuff use a
temporary "scratch_pool", he needs to copy select bits of information from
that pool and into the longer-lived "pool" so that they survive beyond his
clearing of the "scratch_pool". And he's cleverly just updating the
structure members (such as entry->url) from pointing to data-in-scratch-pool
to pointing to data-in-pool instead of futzing with both a structure named
"entry" and one named "scratch_entry" (or the likes).
--
C. Michael Pilato <cmpilato@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Received on Wed Apr 5 15:55:04 2006