Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
13b22bf4
Commit
13b22bf4
authored
Feb 28, 2016
by
Sylvain Corlay
Browse files
Signature formatting for sphinx
parent
504f7553
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
example/example11.ref
example/example11.ref
+5
-5
example/example5.ref
example/example5.ref
+1
-1
include/pybind11/pybind11.h
include/pybind11/pybind11.h
+3
-3
No files found.
example/example11.ref
View file @
13b22bf4
Help on built-in function kw_func in module example
Help on built-in function kw_func in module example
kkww__ffuunncc(...)
kkww__ffuunncc(...)
Signature :
(x : int, y : int)
-> NoneType
kw_func
(x : int, y : int)
Help on built-in function kw_func2 in module example
Help on built-in function kw_func2 in module example
kkww__ffuunncc22(...)
kkww__ffuunncc22(...)
Signature :
(x : int = 100L, y : int = 200L)
-> NoneType
kw_func2
(x : int = 100L, y : int = 200L)
Help on built-in function kw_func3 in module example
Help on built-in function kw_func3 in module example
kkww__ffuunncc33(...)
kkww__ffuunncc33(...)
Signature :
(data : unicode = u'Hello world!')
-> NoneType
kw_func3
(data : unicode = u'Hello world!')
Help on built-in function kw_func4 in module example
Help on built-in function kw_func4 in module example
kkww__ffuunncc44(...)
kkww__ffuunncc44(...)
Signature :
(myList : list<int> = [13L, 17L])
-> NoneType
kw_func4
(myList : list<int> = [13L, 17L])
kw_func(x=5, y=10)
kw_func(x=5, y=10)
kw_func(x=5, y=10)
kw_func(x=5, y=10)
...
@@ -28,7 +28,7 @@ kw_func(x=100, y=10)
...
@@ -28,7 +28,7 @@ kw_func(x=100, y=10)
kw_func(x=5, y=10)
kw_func(x=5, 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:
Caught expected exception: Incompatible function arguments. The following argument types are supported:
1. (x : int = 100L, y : int = 200L)
-> NoneType
1. (x : int = 100L, y : int = 200L)
kw_func4: 13 17
kw_func4: 13 17
kw_func4: 1 2 3
kw_func4: 1 2 3
example/example5.ref
View file @
13b22bf4
...
@@ -13,7 +13,7 @@ Rabbit is a parrot
...
@@ -13,7 +13,7 @@ Rabbit is a parrot
Polly is a parrot
Polly is a parrot
Molly is a dog
Molly is a dog
The following error is expected: Incompatible function arguments. The following argument types are supported:
The following error is expected: Incompatible function arguments. The following argument types are supported:
1. (example.Dog)
-> NoneType
1. (example.Dog)
Callback function 1 called!
Callback function 1 called!
False
False
...
...
include/pybind11/pybind11.h
View file @
13b22bf4
...
@@ -81,7 +81,7 @@ public:
...
@@ -81,7 +81,7 @@ public:
/* Generate a readable signature describing the function's arguments and return value types */
/* Generate a readable signature describing the function's arguments and return value types */
using
detail
::
descr
;
using
detail
::
descr
;
PYBIND11_DESCR
signature
=
cast_in
::
name
()
+
detail
::
_
(
" -> "
)
+
cast_out
::
name
()
;
PYBIND11_DESCR
signature
=
cast_in
::
name
();
/* Register the function with Python from generic (non-templated) code */
/* Register the function with Python from generic (non-templated) code */
initialize
(
rec
,
signature
.
text
(),
signature
.
types
(),
sizeof
...(
Args
));
initialize
(
rec
,
signature
.
text
(),
signature
.
types
(),
sizeof
...(
Args
));
...
@@ -157,7 +157,7 @@ protected:
...
@@ -157,7 +157,7 @@ protected:
/* Generate a readable signature describing the function's arguments and return value types */
/* Generate a readable signature describing the function's arguments and return value types */
using
detail
::
descr
;
using
detail
::
descr
;
PYBIND11_DESCR
signature
=
cast_in
::
name
()
+
detail
::
_
(
" -> "
)
+
cast_out
::
name
()
;
PYBIND11_DESCR
signature
=
cast_in
::
name
();
/* Register the function with Python from generic (non-templated) code */
/* Register the function with Python from generic (non-templated) code */
initialize
(
rec
,
signature
.
text
(),
signature
.
types
(),
sizeof
...(
Args
));
initialize
(
rec
,
signature
.
text
(),
signature
.
types
(),
sizeof
...(
Args
));
...
@@ -298,7 +298,7 @@ protected:
...
@@ -298,7 +298,7 @@ protected:
for
(
auto
it
=
chain_start
;
it
!=
nullptr
;
it
=
it
->
next
)
{
for
(
auto
it
=
chain_start
;
it
!=
nullptr
;
it
=
it
->
next
)
{
if
(
chain
)
if
(
chain
)
signatures
+=
std
::
to_string
(
++
index
)
+
". "
;
signatures
+=
std
::
to_string
(
++
index
)
+
". "
;
signatures
+=
"Signature : "
;
signatures
+=
rec
->
name
;
signatures
+=
it
->
signature
;
signatures
+=
it
->
signature
;
signatures
+=
"
\n
"
;
signatures
+=
"
\n
"
;
if
(
it
->
doc
&&
strlen
(
it
->
doc
)
>
0
)
{
if
(
it
->
doc
&&
strlen
(
it
->
doc
)
>
0
)
{
...
...
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