mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
type of void fixed (None -> NoneType)
This commit is contained in:
parent
56e9f4942b
commit
82ffd40870
@ -1,17 +1,17 @@
|
||||
Help on built-in function kw_func
|
||||
|
||||
kkww__ffuunncc(...)
|
||||
Signature : (x : int, y : int) -> None
|
||||
Signature : (x : int, y : int) -> NoneType
|
||||
|
||||
Help on built-in function kw_func2
|
||||
|
||||
kkww__ffuunncc22(...)
|
||||
Signature : (x : int = 100L, y : int = 200L) -> None
|
||||
Signature : (x : int = 100L, y : int = 200L) -> NoneType
|
||||
|
||||
Help on built-in function kw_func3
|
||||
|
||||
kkww__ffuunncc33(...)
|
||||
Signature : (data : str = u'Hello world!') -> None
|
||||
Signature : (data : str = u'Hello world!') -> NoneType
|
||||
|
||||
kw_func(x=5, y=10)
|
||||
kw_func(x=5, y=10)
|
||||
@ -23,5 +23,5 @@ kw_func(x=100, y=10)
|
||||
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) -> None
|
||||
1. (x : int = 100L, y : int = 200L) -> NoneType
|
||||
|
||||
|
@ -4,7 +4,7 @@ Molly is a dog
|
||||
Molly is a dog
|
||||
Woof!
|
||||
The following error is expected: Incompatible function arguments. The following argument types are supported:
|
||||
1. (Dog) -> None
|
||||
1. (Dog) -> NoneType
|
||||
|
||||
Callback function 1 called!
|
||||
False
|
||||
|
@ -235,7 +235,7 @@ public:
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
PYBIND11_TYPE_CASTER(void_type, _("None"));
|
||||
PYBIND11_TYPE_CASTER(void_type, _("NoneType"));
|
||||
};
|
||||
|
||||
template <> class type_caster<void> : public type_caster<void_type> { };
|
||||
|
Loading…
Reference in New Issue
Block a user