Add return type
diff --git a/example/example11.ref b/example/example11.ref
index 4e04a3b..54e4fef 100644
--- a/example/example11.ref
+++ b/example/example11.ref
@@ -1,22 +1,22 @@
Help on built-in function kw_func in module example
kkww__ffuunncc(...)
- kw_func(x : int, y : int)
+ kw_func(x : int, y : int) -> NoneType
Help on built-in function kw_func2 in module example
kkww__ffuunncc22(...)
- kw_func2(x : int = 100L, y : int = 200L)
+ kw_func2(x : int = 100L, y : int = 200L) -> NoneType
Help on built-in function kw_func3 in module example
kkww__ffuunncc33(...)
- kw_func3(data : unicode = u'Hello world!')
+ kw_func3(data : unicode = u'Hello world!') -> NoneType
Help on built-in function kw_func4 in module example
kkww__ffuunncc44(...)
- kw_func4(myList : list<int> = [13L, 17L])
+ kw_func4(myList : list<int> = [13L, 17L]) -> NoneType
kw_func(x=5, y=10)
kw_func(x=5, y=10)
@@ -28,7 +28,7 @@
kw_func(x=5, y=10)
kw_func(x=5, y=10)
Caught expected exception: Incompatible function arguments. The following argument types are supported:
- 1. (x : int = 100L, y : int = 200L)
+ 1. (x : int = 100L, y : int = 200L) -> NoneType
kw_func4: 13 17
kw_func4: 1 2 3
diff --git a/example/example5.ref b/example/example5.ref
index 40a355c..d1da883 100644
--- a/example/example5.ref
+++ b/example/example5.ref
@@ -13,7 +13,7 @@
Polly is a parrot
Molly is a dog
The following error is expected: Incompatible function arguments. The following argument types are supported:
- 1. (example.Dog)
+ 1. (example.Dog) -> NoneType
Callback function 1 called!
False
diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h
index 43cc02c..a9d5a12 100644
--- a/include/pybind11/pybind11.h
+++ b/include/pybind11/pybind11.h
@@ -81,7 +81,7 @@
/* Generate a readable signature describing the function's arguments and return value types */
using detail::descr;
- PYBIND11_DESCR signature = cast_in::name();
+ PYBIND11_DESCR signature = cast_in::name() + detail::_(" -> ") + cast_out::name();
/* Register the function with Python from generic (non-templated) code */
initialize(rec, signature.text(), signature.types(), sizeof...(Args));
@@ -157,7 +157,7 @@
/* Generate a readable signature describing the function's arguments and return value types */
using detail::descr;
- PYBIND11_DESCR signature = cast_in::name();
+ PYBIND11_DESCR signature = cast_in::name() + detail::_(" -> ") + cast_out::name();
/* Register the function with Python from generic (non-templated) code */
initialize(rec, signature.text(), signature.types(), sizeof...(Args));