Change in default behaviour wrapping C++ bool for Python.

Only a Python True or False will now work for C++ bool parameters.
This fixes overloading bool with other types.
This commit is contained in:
William S Fulton 2014-03-08 12:04:19 +00:00
commit 504c2030bb
11 changed files with 251 additions and 11 deletions

View file

@ -5,12 +5,12 @@ if getconstTC().num != 33:
raise RuntimeError
# primitive reference variables
cvar.var_bool = createref_bool(0)
if value_bool(cvar.var_bool) != 0:
cvar.var_bool = createref_bool(False)
if value_bool(cvar.var_bool) != False:
raise RuntimeError
cvar.var_bool = createref_bool(1)
if value_bool(cvar.var_bool) != 1:
cvar.var_bool = createref_bool(True)
if value_bool(cvar.var_bool) != True:
raise RuntimeError
cvar.var_char = createref_char('w')