File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 36
36
#define XEUS_PYTHON_API
37
37
#endif
38
38
39
+ #ifdef _MSC_VER
40
+ #define XPYT_FORCE_PYBIND11_EXPORT
41
+ #else
42
+ #define XPYT_FORCE_PYBIND11_EXPORT __attribute__ ((visibility (" default" )))
43
+ #endif
39
44
#endif
Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ namespace xpyt
30
30
};
31
31
32
32
XEUS_PYTHON_API void register_filename_mapping (const std::string& filename, int execution_count);
33
- XEUS_PYTHON_API xerror extract_error (py::error_already_set& error);
33
+
34
+ XEUS_PYTHON_API XPYT_FORCE_PYBIND11_EXPORT
35
+ xerror extract_error (py::error_already_set& error);
34
36
}
35
37
36
38
#endif
Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ namespace nl = nlohmann;
28
28
29
29
namespace xpyt
30
30
{
31
- XEUS_PYTHON_API bool is_pyobject_true (const py::object& obj);
31
+ XEUS_PYTHON_API XPYT_FORCE_PYBIND11_EXPORT
32
+ bool is_pyobject_true (const py::object& obj);
32
33
33
34
XEUS_PYTHON_API bool holding_gil ();
34
35
@@ -43,8 +44,11 @@ namespace xpyt
43
44
func; \
44
45
}
45
46
46
- XEUS_PYTHON_API void exec (const py::object& code, const py::object& scope = py::globals());
47
- XEUS_PYTHON_API py::object eval (const py::object& code, const py::object& scope = py::globals());
47
+ XEUS_PYTHON_API XPYT_FORCE_PYBIND11_EXPORT
48
+ void exec (const py::object& code, const py::object& scope = py::globals());
49
+
50
+ XEUS_PYTHON_API XPYT_FORCE_PYBIND11_EXPORT
51
+ py::object eval (const py::object& code, const py::object& scope = py::globals());
48
52
}
49
53
50
54
#endif
You can’t perform that action at this time.
0 commit comments