type_caster<std::function>: allow None values in both directions

This commit is contained in:
Wenzel Jakob
2016-08-18 11:18:12 +02:00
parent 0b63231bae
commit 8de0437e46
4 changed files with 13 additions and 1 deletions

View File

@@ -68,6 +68,8 @@ from example import roundtrip
test_dummy_function(dummy_function)
test_dummy_function(roundtrip(dummy_function))
if roundtrip(None) is not None:
print("Problem!")
test_dummy_function(lambda x: x + 2)
try: