You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Hudson <gh...@MIT.EDU> on 2002/09/02 14:55:36 UTC

Re: [ghudson@MIT.EDU: Re: svn commit: rev 3110 -trunk/subversion/include]

On Mon, 2002-09-02 at 03:33, Gerald Richter wrote:
> On the one side I see your argument that you don't want to have your structs
> poluted with things that don't belong to svn

I very much don't want to have our structs polluted with fields for the
benefit of very specific callers.

, on the other side it's a
> common approach to have some user data member

It's common when you're going to make a callback.  It's not common to
just randomly insert them into structures.  And in the unusual cases
where you do (e.g. a GNOME widget), you generally have an API for
setting and accessing them; you don't just tack them on at the end.

(I'll note that given Greg Stein's approach, our ABI changes if we add
or remove editor functions, unless we're careful to do so only at the
end of the structure.  That's trivially addressed by putting ctx at the
beginning, but it illustrates the dangers of using non-opaque data types
in an API.)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org