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
8adef2c7
Unverified
Commit
8adef2c7
authored
Nov 23, 2020
by
Boris Staletic
Committed by
GitHub
Nov 23, 2020
Browse files
fix: workaround for #2682 and #2422 by simply clearing the TypeError (#2685)
parent
087b07c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
include/pybind11/cast.h
include/pybind11/cast.h
+8
-1
No files found.
include/pybind11/cast.h
View file @
8adef2c7
...
...
@@ -1870,7 +1870,14 @@ private:
#if !defined(NDEBUG)
,
type
(
type_id
<
T
>
())
#endif
{
}
{
// Workaround! See:
// https://github.com/pybind/pybind11/issues/2336
// https://github.com/pybind/pybind11/pull/2685#issuecomment-731286700
if
(
PyErr_Occurred
())
{
PyErr_Clear
();
}
}
public:
/// Direct construction with name, default, and description
...
...
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