Skip to content

Commit 2f22f29

Browse files
oralubenXZiar
andcommitted
Set visibility of exceptions to default.
Co-authored-by: XZiar <[email protected]>
1 parent b6ec0e9 commit 2f22f29

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/pybind11/detail/common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,15 +724,15 @@ using expand_side_effects = bool[];
724724
PYBIND11_NAMESPACE_END(detail)
725725

726726
/// C++ bindings of builtin Python exceptions
727-
class builtin_exception : public std::runtime_error {
727+
class PYBIND11_EXPORT builtin_exception : public std::runtime_error {
728728
public:
729729
using std::runtime_error::runtime_error;
730730
/// Set the error using the Python C API
731731
virtual void set_error() const = 0;
732732
};
733733

734734
#define PYBIND11_RUNTIME_EXCEPTION(name, type) \
735-
class name : public builtin_exception { public: \
735+
class PYBIND11_EXPORT name : public builtin_exception { public: \
736736
using builtin_exception::builtin_exception; \
737737
name() : name("") { } \
738738
void set_error() const override { PyErr_SetString(type, what()); } \

include/pybind11/pytypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ PYBIND11_NAMESPACE_END(detail)
323323
/// thrown to propagate python-side errors back through C++ which can either be caught manually or
324324
/// else falls back to the function dispatcher (which then raises the captured error back to
325325
/// python).
326-
class error_already_set : public std::runtime_error {
326+
class PYBIND11_EXPORT error_already_set : public std::runtime_error {
327327
public:
328328
/// Constructs a new exception from the current Python error indicator, if any. The current
329329
/// Python error indicator will be cleared.

0 commit comments

Comments
 (0)