summaryrefslogtreecommitdiffstats
path: root/sipgen
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:49:58 +0200
commitc01e03c55d17df4fb5495903bd64cbead2599eca (patch)
tree5578b2e5d102fc58c66a9e39d68508d2d2ddcc4c /sipgen
parentbf6ab2d7b39cb38049de2b4fe7975b1e816c4ce4 (diff)
downloadsip4-tqt-18a5446ba2eeafe36eba9f9de44409f672d70152.tar.gz
sip4-tqt-18a5446ba2eeafe36eba9f9de44409f672d70152.zip
Force cast in sipEnumMemberDefr14.0.5r14.0.4
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> (cherry picked from commit 0747f550f709a80d4dda351f6f593113a15d9f43)
Diffstat (limited to 'sipgen')
-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))