enable passing C++ instances to void*-valued arguments

This commit is contained in:
Wenzel Jakob
2016-04-30 19:56:10 +02:00
parent e8b9dd263c
commit 772c6d54d6
5 changed files with 40 additions and 15 deletions

View File

@@ -33,7 +33,12 @@ print_opaque_list(cvp.stringList)
#####
print_void_ptr(return_void_ptr())
print_void_ptr(Example1()) # Should also work for other C++ types
print_void_ptr(Example1()) # Should also work for other C++ types
try:
print_void_ptr([1, 2, 3]) # This should not work
except Exception as e:
print("Caught expected exception: " + str(e))
print(return_null_str())
print_null_str(return_null_str())