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:
parent
7f45cbd178
commit
504c2030bb
11 changed files with 251 additions and 11 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue