[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: Philip Martin <philip_at_codematters.co.uk>
Date: 2004-09-21 01:42:20 CEST

"C. Michael Pilato" <cmpilato@collab.net> writes:

> 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 believe it is ABI compatible on a gcc/Linux platform. As far as I
can recall, the same applied on the various Unix platforms I have
used in the past.

Looking at the C standard Function calls

    "If the function is defined with a type that is not compatible
    with the type (of the expression) pointed to by the expression
    that denotes the called function, the behaviour is undefined." Function declarators (including prototypes)

    "For two function types to be compatible [...] the parameter type
    lists [...] shall agree in the number of parameters [...] ;
    corresponding parameters shall have compatible types"

 6.7.3/9 Type qualifiers

    "For two qualifed types to be compatible, both shall have the
    identically qualified version of a compatible type"

So it would appear to be undefined behaviour--in other words, it's
"nasal demons" territory.

Philip Martin
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 21 01:42:38 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.