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

Re: Notification API

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-03-01 08:37:49 CET

On Mon, 28 Feb 2005, Greg Hudson wrote:

> On Mon, 2005-02-28 at 17:03, Peter N. Lundblad wrote:
> > - REquire that this struct is created bya an svn_wc_notify_args_create (or
> > some name), that initialize everything to default arguments.
>
> Who are we imposing this requirement on? I don't think callers invoke
> notification callbacks.
>
On our selves.

> If the requirement is on us, the Subversion libraries, then
> svn_wc_notify_args_create or whatever does not need to be part of the
> API.
>
Well, at least libsvn_client will have to create this struct, since it
calls the notify function in a few places. (For some strange reason, this
API is in svn_wc.h; I don't plan to change that.)

> > Then we can add fields in the future without having
to revise > > again.
>
> If these fields are for the benefit of callers, how will they know when
> they can safely use new fields?
>
The point of having a creation function that allocates the struct in a
pool is so it can initialize all fields to a known value (NULL,
SVN_INVALID_REVNUM, etc.) It is the same thinking that motivated
svn_client_create_context, but to make life easier for ourselves the next
time we want to add a field to this new struct.

Hope this clarifies,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 1 09:01:38 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.