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

Re: svn_repos_trace_node_locations()

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2004-10-01 20:59:13 CEST

On Fri, 1 Oct 2004, Archie Cobbs wrote:

> Julian Foad wrote:
> > >> Would it violate our API promises to add 'const' to the
> > >> location_revisions parameter of this function in svn_repos.h:
> > >>
> > >> svn_error_t *
> > >> svn_repos_trace_node_locations (svn_fs_t *fs,
> > >> apr_hash_t **locations,
> > >> const char *fs_path,
> > >> svn_revnum_t peg_revision,
> > >> apr_array_header_t *location_revisions,
> > >> apr_pool_t *pool);
> > >>
> > >> ?
> > >
> > > I'm guessing 'yes', since we already have this issue:
> > > http://subversion.tigris.org/issues/show_bug.cgi?id=1952
> > > which is purely a reminder to const-ify a different pointer come 2.0.
> >
> > May I suggest you add this to issue #1952, and broaden the summary of the issue to cover all such 'const' additions?
>
> I don't see how adding "const" would break the API. That change
> would simply acknowledge to new application code what is already
> true in the library code, namely, that svn_repos_trace_node_locations()
> does not modify *location_revisions. Maybe I don't understand the
> "API promises".
>
I think someone quoted the C standard where it says that if you call a
function and it doesn't have exactly the same signature as your
declaration (including const qualification), behaviour is undefined.
Remember that this is about binary compability. Feel free to just correct
me if I'm wrong...

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 1 20:47:42 2004

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.