WG: Nested Structures Warning (Python, Swig 4.01.)
Gunther Schütze <[email protected]>
| Newsgroups | gmane.comp.programming.swig |
|---|---|
| Message-ID | <[email protected]> |
If the inner union is named (e.g. union tagIntRep { int ivalue; ...) and
%flatnested is used, the getters and setters for the members of the union
are created. Without %flatnested, only the getters and setters for the
union, but not for its members, are created.
So it seems that one has to call %flatnested explicitly and also has to give
the inner structures a name.
Regards,
Gunther Schütze
-----Ursprüngliche Nachricht-----
Von: Gunther Schütze [mailto:[email protected]]
Gesendet: Donnerstag, 6. Februar 2020 09:44
An: '[email protected]' <[email protected]>
Betreff: AW: [Swig-user] Nested Structures Warning (Python, Swig 4.01.)
Hi,
Yes, Object_intRep_ivalue_set ... are still missing with %flatnested in the
input file.
Regards,
Gunther
-----Ursprüngliche Nachricht-----
Von: Vladimir Kalinin [mailto:[email protected]]
Gesendet: Mittwoch, 5. Februar 2020 16:52
An: [email protected]
Betreff: Re: [Swig-user] Nested Structures Warning (Python, Swig 4.01.)
Hi,
does that still happen if you put %flatnested at the top you your input
file?
(It should be on by default for Python, but who knows)
On 2/5/2020 5:53 PM, Gunther Schütze wrote:
> Hello,
>
> With Swig 4.0.1 and Python 3.8 I keep getting warnings 325 and 312
> (Nested union/struct not currently supported) that I did not get with Swig
> 1.3.40.
>
> An example is the following struct taken from the documentation:
>
> typedef struct Object {
> int objtype;
> union {
> int ivalue;
> double dvalue;
> } intRep;
> } Object;
>
> This used to work with Swig 1.3.40, but when I put the code into a C++
> programm (Visual Studio 2015) with Swig 4.0.1 there is the 'warning 312:
> Nested union not currently supported (ignored)'. Object_objtype_set
> and Object_objtype_get are created but Object_intRep_ivalue_set,
> Object_intRep_ivalue_get, Object_intRep_dvalue_set and
> Object_intRep_dvalue_get are missing.
>
> Any help would be appreciated.
>
>
> Regards,
> Gunther
>
>
> _______________________________________________
> Swig-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/swig-user
_______________________________________________
Swig-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swig-user
_______________________________________________
Swig-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swig-user