Skip to content

Generated Python code is not interoperable when a union contains a member called "value" #338

Description

When using an IDL file which defines a union, which contains a member called "value" - the generated python code is no longer interoperable with other language implementations.

For example:

module AddressSpace {

    union QualifiedName switch (boolean) {
        case TRUE:
            string value;
    };

    struct Node {
        long node_id;
        QualifiedName browse_name;
        string display_name;
    };

};

I used this IDL as a replacement for the "hello world" examples in both the python and C repositories (C acting as the publisher, python as the subscriber). With the IDL file exactly as above, the publisher never matches with a reader. Simply changing the above IDL file to replace the "value" member with something else (say, for example "the_value"), and regenerating the C and python code - causes everything to work as expected.

I am also aware of the @optional IDL syntax - but unfortunately cannot use it in this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions