[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: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2004-10-01 18:33:36 CEST

On Fri, 2004-10-01 at 12:11, 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 don't see how adding "const" would break the API.

You're right. I followed this thread for a while but initially had the
wrong conclusion, so I didn't speak up because I thought CMike had
gotten the right answer.

I think it would be just fine to add "const" to the parameter, in a
1.x.0 release. All it does is make the function a little nicer. Issue
#1952 is different because it's changing the expected signature of a
callback ("your callback must be a little nicer").

I know Philip raised some ABI concerns based on the C standard, but
really, the C standard has little bearing on how API translates into
ABI; that's up to the implementations. And implementations don't care
what you declare const when determining ABIs.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 1 18:33:58 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.