6 #ifndef TURI_PYTHON_CALLBACKS_H_ 7 #define TURI_PYTHON_CALLBACKS_H_ 9 #include <core/util/code_optimization.hpp> 11 #include <core/export.hpp> 18 namespace turi {
namespace python {
20 struct python_exception_info {
21 std::string exception_pickle;
22 std::string exception_string;
26 void register_python_exception(
const python_exception_info*);
27 extern bool _python_exception_occured;
29 void _process_registered_exception() GL_COLD_NOINLINE;
52 static inline
GL_HOT_INLINE void check_for_python_exception() {
53 if(UNLIKELY(_python_exception_occured)) {
54 _process_registered_exception();