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

Re: Clarifying structure modification in HACKING was Re: Suppress display of sensitive info by servers (proposal)

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2005-04-13 21:18:53 CEST

Greg Hudson wrote:

> I think your policy makes sense, but we should document more explicitly
> that callers must use our provided constructors for all public
> structures. In most cases, we don't really expect callers to be
> motivated to do otherwise (certainly not for svn_error_t), but I don't
> think we can treat it as implicit.

If we can rely on anything it's that users will do silly things, and no
matter how little sense it makes to allocate on the stack and manually
initialize something, someone somewhere will do it, and complain when it
breaks. I'd prefer to just not make it possible to make that mistake,
but at the very least the warning signs need to be very explicit to
minimize the chance of problems occurring.

> Someone suggested doing away with all public structures in 2.0. I think
> that would be kind of inconvenient; str->len would become the less
> wieldly svn_string_length(str), etc.

We could have semi-public structures, declared in an internal header
which is included by the internal library code, so within the svn libs
we could use str->len, but externally you have to use svn_string_len(str).


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 13 21:19:40 2005

This is an archived mail posted to the Subversion Dev mailing list.