[Python] Deal with an integer as the default value of a bool

parameter in the C++ prototype.  Fixes github #327, reported by
Greg Allen.
This commit is contained in:
Olly Betts 2015-05-07 16:24:56 +12:00
commit c2972b8bf0
4 changed files with 18 additions and 0 deletions

View file

@ -1927,6 +1927,10 @@ public:
}
}
// Allow integers as the default value for a bool parameter.
if (Cmp(t, "bool") == 0)
return NewString(value ? "True" : "False");
// Deal with the values starting with 0 first as they can be octal or
// hexadecimal numbers or even pointers.
if (s[0] == '0') {