From 732822b53ea288a33d370048eca6f119fbe612bb Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Fri, 12 May 2006 08:08:45 +0000 Subject: Merged changes from glibmm-2-10 branch. --- glib/glibmm/main.cc | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'glib/glibmm/main.cc') diff --git a/glib/glibmm/main.cc b/glib/glibmm/main.cc index f040f053..cada0401 100644 --- a/glib/glibmm/main.cc +++ b/glib/glibmm/main.cc @@ -189,15 +189,19 @@ static gboolean glibmm_source_callback(void* data) { SourceConnectionNode *const conn_data = static_cast(data); + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Recreate the specific slot from the generic slot node. return (*static_cast*>(conn_data->get_slot()))(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED return 0; } @@ -206,16 +210,20 @@ static gboolean glibmm_iosource_callback(GIOChannel*, GIOCondition condition, vo SourceCallbackData *const callback_data = static_cast(data); g_return_val_if_fail(callback_data->node != 0, 0); + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED // Recreate the specific slot from the generic slot node. return (*static_cast*>(callback_data->node->get_slot())) ((Glib::IOCondition) condition); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED return 0; } @@ -227,15 +235,18 @@ static gboolean glibmm_child_watch_callback(GPid pid, gint child_status, void* d { SourceConnectionNode *const conn_data = static_cast(data); + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED //Recreate the specific slot from the generic slot node. (*static_cast*>(conn_data->get_slot()))(pid, child_status); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } - catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED return 0; } @@ -806,30 +817,40 @@ Source* Source::get_wrapper(GSource* source) // static gboolean Source::prepare_vfunc(GSource* source, int* timeout) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED Source *const self = get_wrapper(source); return self->prepare(*timeout); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED + return 0; } // static gboolean Source::check_vfunc(GSource* source) { + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED Source *const self = get_wrapper(source); return self->check(); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED + return 0; } @@ -841,15 +862,19 @@ gboolean Source::dispatch_vfunc(GSource*, GSourceFunc callback, void* user_data) g_return_val_if_fail(callback == &glibmm_dummy_source_callback, 0); g_return_val_if_fail(callback_data != 0 && callback_data->node != 0, 0); + #ifdef GLIBMM_EXCEPTIONS_ENABLED try { + #endif //GLIBMM_EXCEPTIONS_ENABLED Source *const self = callback_data->wrapper; return self->dispatch(callback_data->node->get_slot()); + #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } + #endif //GLIBMM_EXCEPTIONS_ENABLED return 0; } -- cgit v1.2.1