#1373 global nested struct variable ignored

None
closed
None
5
2014-07-01
2014-06-11
Simon MARCHETTO
No

Given the following interface file:

%module nested_structs_issue;

%inline %{
struct Outer {
  struct {
    int val;
  } inner1, inner2;
};

Only the first nested struct "inner1" seems to be taken in account by SWIG. The accessor function "Outer_inner1_val_get()" is generated, but not "Outer_inner2_val_get()".

One can see in the attached SWIG debug file (produced with "-debug-top 4") only one node for the "Outer_inner1" class: "Outer_inner2" is missing. It occurs with the target language scilab but also seems to occurs with other languages.

This issue affects the "nested_structs" test case in Scilab branch.

%}

1 Attachments

Discussion

  • William Fulton
    William Fulton
    2014-07-01

    • status: open --> closed
    • assigned_to: William Fulton
    • Group: -->
     
  • William Fulton
    William Fulton
    2014-07-01

    As discussed on the swig-devel mailing list, the wrapped type is called Outer_inner1 and so there should only be one Outer_inner1_val_get() method.