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

Re: parameter name of svn_fs_paths_changed2() -- was: Re: SWIG (Perl) prospective patch

From: Stefan Sperling <stsp_at_elego.de>
Date: Tue, 16 Jun 2009 15:33:27 +0100

On Tue, Jun 16, 2009 at 04:07:26PM +0200, Neels Janosch Hofmeyr wrote:
> That said, I see how the bindings sort of *need* it to be a different name.
>
> [[[
> %hash_argout_typemap(changed_paths_p, svn_fs_path_change_t *)
> +%hash_argout_typemap(changed_paths2_p, svn_fs_path_change2_t *)
> ]]]
>
> The bindings code shouldn't be like that. after all, variable names can be
> similar and hash tables can contain anything.

Somehow this doesn't make sense to me...
I must be missing something.

Why do bindings depend on the name of variables, instead of the type?
E.g. it's legal in C to omit variable names from function prototypes
altogether. What would the bindings do then?

If the type of values in a hash table changes, can't the bindings
deal with this by making changes internally to the function,
just like we do in C?

I admit that I don't know much about how SWIG works, but relying
on the names of variables seems really wrong. And from the short
time I played with SWIG a long time ago I can't recall it having
such a requirement.

Stefan
Received on 2009-06-16 16:34:19 CEST

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.