diff options
-rw-r--r-- | sipgen/gencode.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sipgen/gencode.c b/sipgen/gencode.c index 7dcf1b1..f7d239e 100644 --- a/sipgen/gencode.c +++ b/sipgen/gencode.c @@ -2737,6 +2737,9 @@ static int generateEnumMemberTable(sipSpec *pt, moduleDef *mod, classDef *cd, prcode(fp, " {%N, ", emd->pyname); + // enums in sip are always int, but can be an unsigned in C++ code + // therefore it is necessary to force the cast in the generated files + prcode(fp, "(int)"); if (cd != NULL) { if (isProtectedEnum(emd->ed)) |