Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
4c7bf9bb
Commit
4c7bf9bb
authored
Mar 08, 2016
by
Sylvain Corlay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add return type
parent
0e04fdf3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
example/example11.ref
+5
-5
example/example5.ref
+1
-1
include/pybind11/pybind11.h
+2
-2
No files found.
example/example11.ref
View file @
4c7bf9bb
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=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)
1. (x : int = 100L, y : int = 200L)
-> NoneType
kw_func4: 13 17
kw_func4: 1 2 3
example/example5.ref
View file @
4c7bf9bb
...
...
@@ -13,7 +13,7 @@ Rabbit is a parrot
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
...
...
include/pybind11/pybind11.h
View file @
4c7bf9bb
...
...
@@ -81,7 +81,7 @@ public:
/* 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 @@ protected:
/* 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
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment