Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
e72a676b
Commit
e72a676b
authored
Sep 14, 2016
by
Wenzel Jakob
Browse files
More verbose error messages when PyType_Ready fails
parent
c1fc27e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
include/pybind11/pybind11.h
include/pybind11/pybind11.h
+3
-2
No files found.
include/pybind11/pybind11.h
View file @
e72a676b
...
...
@@ -633,7 +633,7 @@ protected:
auto
type
=
(
PyHeapTypeObject
*
)
type_holder
.
ptr
();
if
(
!
type_holder
||
!
name
)
pybind11_fail
(
"generic_type
:
u
nable to create type object!"
);
pybind11_fail
(
std
::
string
(
rec
->
name
)
+
"
:
U
nable to create type object!"
);
/* Register supplemental type information in C++ dict */
detail
::
type_info
*
tinfo
=
new
detail
::
type_info
();
...
...
@@ -682,7 +682,8 @@ protected:
type
->
ht_type
.
tp_doc
=
tp_doc
;
if
(
PyType_Ready
(
&
type
->
ht_type
)
<
0
)
pybind11_fail
(
"generic_type: PyType_Ready failed!"
);
pybind11_fail
(
std
::
string
(
rec
->
name
)
+
": PyType_Ready failed ("
+
detail
::
error_string
()
+
")!"
);
m_ptr
=
type_holder
.
ptr
();
...
...
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