[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:
parent
c2a13b9b7b
commit
c2972b8bf0
4 changed files with 18 additions and 0 deletions
|
|
@ -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') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue