diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-09-03 14:45:31 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-09-03 14:45:31 +0200 |
commit | 0747f550f709a80d4dda351f6f593113a15d9f43 (patch) | |
tree | 5578b2e5d102fc58c66a9e39d68508d2d2ddcc4c | |
parent | 916b7d8e62bcc40d480373540c2e5f5497ff9b1a (diff) | |
download | sip4-tqt-0747f550f709a80d4dda351f6f593113a15d9f43.tar.gz sip4-tqt-0747f550f709a80d4dda351f6f593113a15d9f43.zip |
Force cast in sipEnumMemberDef
This resolves FTBFS due to a narrowing conversions using
C++11 dialect (GCC6) in python-tqt and python-trinity
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-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)) |