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

Re: svn commit: r12773 - branches/locking/subversion/libsvn_fs_fs

From: Brian W. Fitzpatrick <fitz_at_red-bean.com>
Date: 2005-01-21 08:42:30 CET

On Jan 19, 2005, at 12:19 PM, Philip Martin wrote:

> fitz@tigris.org writes:
>
>> Author: fitz
>> Date: Mon Jan 17 23:09:32 2005
>> New Revision: 12773
>
>> --- branches/locking/subversion/libsvn_fs_fs/lock.c (original)
>> +++ branches/locking/subversion/libsvn_fs_fs/lock.c Mon Jan 17
>> 23:09:32 2005
>> @@ -756,6 +756,7 @@
>> svn_lock_t *new_lock;
>> svn_fs_root_t *root;
>> svn_revnum_t youngest;
>> + apr_pool_t *subpool = svn_pool_create (pool);
>>
>> SVN_ERR (svn_fs_fs__check_fs (fs));
>>
>> @@ -795,6 +796,8 @@
>> path);
>> }
>>
>> + SVN_ERR (svn_fs_fs__get_write_lock (fs, subpool));
>> +
>> /* Is the path already locked?
>>
>> Note that this next function call will automatically ignore any
>> @@ -826,6 +829,9 @@
>> SVN_ERR (write_lock_to_file (fs, new_lock, pool));
>> *lock_p = new_lock;
>>
>> + /* Destroy our subpool and release the lock. */
>> + svn_pool_destroy (subpool);
>> +
>
> At present you are using the subpool to manage the lock; that's fine
> but how about using the subpool to manage more resources? Obviously it
> should not be used to allocate any memory that gets returned from the
> function, but it could get passed instead of pool for anything that
> only requires transient allocations.

*nod*

I should have put a TODO in the code to do this instead of in my
personal notes file. I'll hopefully get to that today (Friday) as well
as Lundblad's suggested doc tweak and token check.

Thanks,

-Fitz

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jan 21 08:44:53 2005

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.