You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ivan Zhakov <iv...@visualsvn.com> on 2016/08/26 10:15:16 UTC

Remove svn_client_ctx_t from svn_client_conflict_t

Hi Stefan,

Currently svn_client_conflict_t stores a pointer to svn_client_ctx_t
inside and uses it for every operation like
svn_client_conflict_tree_get_details() or
svn_client_conflict_*_resolve(). It may be useful for simple cases,
but for other cases it makes using new API more difficult. That's
because an API user needs to guarantee that lifetime of
svn_client_ctx_t is longer than of the svn_client_conflict_t instance.

I suggest changing svn_client_conflict_* API so that it wouldn't keep
reference to svn_client_ctx_t and add it as argument to all API
functions where it's required.

I can do that, if there are no objections. What do you think?

-- 
Ivan Zhakov

Re: Remove svn_client_ctx_t from svn_client_conflict_t

Posted by Ivan Zhakov <iv...@visualsvn.com>.
On 26 August 2016 at 13:36, Stefan Sperling <st...@elego.de> wrote:
> On Fri, Aug 26, 2016 at 01:15:16PM +0300, Ivan Zhakov wrote:
>> Hi Stefan,
>>
>> Currently svn_client_conflict_t stores a pointer to svn_client_ctx_t
>> inside and uses it for every operation like
>> svn_client_conflict_tree_get_details() or
>> svn_client_conflict_*_resolve(). It may be useful for simple cases,
>> but for other cases it makes using new API more difficult. That's
>> because an API user needs to guarantee that lifetime of
>> svn_client_ctx_t is longer than of the svn_client_conflict_t instance.
>>
>> I suggest changing svn_client_conflict_* API so that it wouldn't keep
>> reference to svn_client_ctx_t and add it as argument to all API
>> functions where it's required.
>>
>> I can do that, if there are no objections. What do you think?
>
> Sure. I have no objection.
Done in r1758183.



-- 
Ivan Zhakov

Re: Remove svn_client_ctx_t from svn_client_conflict_t

Posted by Stefan Sperling <st...@elego.de>.
On Fri, Aug 26, 2016 at 01:15:16PM +0300, Ivan Zhakov wrote:
> Hi Stefan,
> 
> Currently svn_client_conflict_t stores a pointer to svn_client_ctx_t
> inside and uses it for every operation like
> svn_client_conflict_tree_get_details() or
> svn_client_conflict_*_resolve(). It may be useful for simple cases,
> but for other cases it makes using new API more difficult. That's
> because an API user needs to guarantee that lifetime of
> svn_client_ctx_t is longer than of the svn_client_conflict_t instance.
> 
> I suggest changing svn_client_conflict_* API so that it wouldn't keep
> reference to svn_client_ctx_t and add it as argument to all API
> functions where it's required.
> 
> I can do that, if there are no objections. What do you think?

Sure. I have no objection.