summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-09-03 14:45:31 +0200
committerSlávek Banko <slavek.banko@axis.cz>2016-09-03 14:45:31 +0200
commit0747f550f709a80d4dda351f6f593113a15d9f43 (patch)
tree5578b2e5d102fc58c66a9e39d68508d2d2ddcc4c
parent916b7d8e62bcc40d480373540c2e5f5497ff9b1a (diff)
downloadsip4-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.c3
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))