You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix unqualified enums in default arguments for CastXML
CastXML currently doesn't modify enum names used in default arguments for
functions, it simply uses the same text present in the source file. This
causes compilation failures in bindings generated by pyplusplus in case
of code such as the following:
namespace ns1
{
namespace ns2
{
enum color { red };
void foo(color arg = ns2::red);
}
}
In this case, CastXML produces "ns2::red" as the default value while
GCCXML removes the namespace name and sets the default value to "red".
pygccxml's patcher for unqualified names expects GCCXML's behavior, so
it fails to detect the CastXML output as one needing further
qualification.
Consequently, pyplusplus refers to the default value as "ns2::red",
which fails compilation because the name needs to be fully qualified as
"ns1::ns2::red". This fix produces the desired qualified output from
pygccxml with both GCCXML and CastXML.
Change-Id: I724408981b69bc184e246636da3fac0c70cb215c
Cherry-picked from the develop branch
0 commit comments