|
From: William S F. <ws...@fu...> - 2016-10-23 19:50:43
|
On 15 October 2016 at 00:36, Myria <myr...@gm...> wrote:
> I have a struct that looks like this:
>
> %module badname;
>
> struct BadName
> {
> int a;
> int a_get() const;
> };
>
>
>
> The problem is that SWIG is generating two functions named
> _wrap_BadName_a_get, causing a compile error in the badname_wrap.cxx
> file.
>
> Is there a way to work around this problem? Note that there are
> thousands of lines of existing Lua script code that we have that
> expect both cases to work, so changing the Lua side isn't an option.
>
Use the advanced renaming to ignore all methods ending in _get by
adding this at the top of your interface file:
%rename("$ignore", regexmatch$name="_get$") "";
See http://swig.org/Doc3.0/SWIG.html#SWIG_rename_ignore
William
|