Fix handling of NULL default argument values for pointer types.
Accept not only manifest pointer types (such as e.g. "void *") but also types that are typedefs for pointer types when checking whether C++ value of 0 must be represented as 0 or None in Python. Closes #365, #376.
This commit is contained in:
parent
3394eab52e
commit
0eae8a8efa
4 changed files with 35 additions and 2 deletions
|
|
@ -31,6 +31,17 @@ def run(module_name):
|
|||
f.newname()
|
||||
f.newname(1)
|
||||
|
||||
if f.double_if_void_ptr_is_null(2, None) != 4:
|
||||
raise RuntimeError
|
||||
|
||||
if f.double_if_void_ptr_is_null(3) != 6:
|
||||
raise RuntimeError
|
||||
|
||||
if f.double_if_handle_is_null(4, None) != 8:
|
||||
raise RuntimeError
|
||||
|
||||
if f.double_if_handle_is_null(5) != 10:
|
||||
raise RuntimeError
|
||||
|
||||
try:
|
||||
f = default_args.Foo(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue