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
30716c67
Unverified
Commit
30716c67
authored
Apr 15, 2022
by
Ralf W. Grosse-Kunstleve
Committed by
GitHub
Apr 15, 2022
Browse files
Also add error_scope assignment operator to complete the rule-of-3 (follow-on to PR #3870). (#3872)
parent
3829b762
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
include/pybind11/detail/common.h
include/pybind11/detail/common.h
+1
-0
No files found.
include/pybind11/detail/common.h
View file @
30716c67
...
...
@@ -993,6 +993,7 @@ struct error_scope {
PyObject
*
type
,
*
value
,
*
trace
;
error_scope
()
{
PyErr_Fetch
(
&
type
,
&
value
,
&
trace
);
}
error_scope
(
const
error_scope
&
)
=
delete
;
error_scope
&
operator
=
(
const
error_scope
&
)
=
delete
;
~
error_scope
()
{
PyErr_Restore
(
type
,
value
,
trace
);
}
};
...
...
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