Fix handling of "default" typemap in Python.

Use "compact" arguments form for the function if "default" typemap is defined
for any of its arguments to allow omitting this argument when calling it from
Python.

Closes #377.
This commit is contained in:
Vadim Zeitlin 2015-04-22 20:37:55 +02:00
commit 5569d91bd0
4 changed files with 27 additions and 7 deletions

View file

@ -43,6 +43,12 @@ def run(module_name):
if f.double_if_handle_is_null(5) != 10:
raise RuntimeError
if f.double_if_dbl_ptr_is_null(6, None) != 12:
raise RuntimeError
if f.double_if_dbl_ptr_is_null(7) != 14:
raise RuntimeError
try:
f = default_args.Foo(1)
error = 1