Browse Source

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>
(cherry picked from commit 0747f550f7)
r14.0.x r14.0.5
Slávek Banko 6 years ago
parent
commit
c01e03c55d
  1. 3
      sipgen/gencode.c

3
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))

Loading…
Cancel
Save