Bugs item #3259800, was opened at 2011-03-30 09:47
Message generated for change (Settings changed) made by wsfulton
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=101645&aid=3259800&group_id=1645
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: code generation (general)
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: Nobody/Anonymous (nobody)
Summary: Ignore isn't working for nested struct fields
Initial Comment:
1. Create following files
test.h:
struct S1
{
struct {
int i1, i2;
struct {
int i3, i4;
} s2;
} variant;
};
test.i:
%immutable;
%ignore S1::variant::s2;
%ignore S1_variant::s2;
%ignore S1_variant_s2;
%{
#include "test.h"
%}
%include "test.h"
2. Run swig:
swig -java -module test test.i
Expected result:
Only S1::variant::i1 and S1::variant::i2 are wrapped.
Actual result:
S1::variant::s2 is also wrapped.
----------------------------------------------------------------------
Comment By: William Fulton (wsfulton)
Date: 2011-04-01 19:23
Message:
Use:
%ignore S1_variant_s2;
%ignore s2;
to ignore all of this struct. SWIG doesn't really support nested classes
properly, so expect a few quirks like this.
There were some improvements to nested classes in 2.0.0, and %ignore
didn't change between 1.3.40 and 2.0.0.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=101645&aid=3259800&group_id=1645
|