summaryrefslogtreecommitdiff
path: root/glib/glibmm/dispatcher.cc
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2010-05-31 13:16:28 +0200
committerMurray Cumming <murrayc@murrayc.com>2010-05-31 13:16:28 +0200
commitde7e9208edb460830accf5835afcbbf9ac4d212b (patch)
treed74cd224716e60e11723a3ba2777f1a757c218fe /glib/glibmm/dispatcher.cc
parentf510673363137d691f5063bc68d9fa7bb3ef9709 (diff)
downloadglibmm-de7e9208edb460830accf5835afcbbf9ac4d212b.tar.gz
Remove the reduced API options and code, as discussed on mailing list.
* configure.ac: Removed the --enable-api-exceptions, --enable-api-properties, --enable-api-vfuncs and --enable-api-default-signal-handlers options. * build/reduced.m4: Removed. * tools/m4/*.m4: * tools/pm/Output.pm: Remove any use of ifdefs and auto_ptr for reduced API. * *.[hg|ccg|h|cc]: Remove the idefed code.
Diffstat (limited to 'glib/glibmm/dispatcher.cc')
-rw-r--r--glib/glibmm/dispatcher.cc26
1 files changed, 0 insertions, 26 deletions
diff --git a/glib/glibmm/dispatcher.cc b/glib/glibmm/dispatcher.cc
index a4f7fbb2..3a74591a 100644
--- a/glib/glibmm/dispatcher.cc
+++ b/glib/glibmm/dispatcher.cc
@@ -179,13 +179,7 @@ DispatchNotifier::DispatchNotifier(const Glib::RefPtr<MainContext>& context)
{
create_pipe();
-#if defined(GLIBMM_EXCEPTIONS_ENABLED)
try
-#elif defined(G_OS_WIN32)
- if(fd_receiver_)
-#else
- if(fd_receiver_ >= 0)
-#endif
{
#ifdef G_OS_WIN32
const int fd = GPOINTER_TO_INT(fd_receiver_);
@@ -195,7 +189,6 @@ DispatchNotifier::DispatchNotifier(const Glib::RefPtr<MainContext>& context)
context_->signal_io().connect(sigc::mem_fun(*this, &DispatchNotifier::pipe_io_handler),
fd, Glib::IO_IN);
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
catch(...)
{
# ifndef G_OS_WIN32
@@ -205,7 +198,6 @@ DispatchNotifier::DispatchNotifier(const Glib::RefPtr<MainContext>& context)
throw;
}
-#endif /* GLIBMM_EXCEPTIONS_ENABLED */
}
DispatchNotifier::~DispatchNotifier()
@@ -227,15 +219,10 @@ void DispatchNotifier::create_pipe()
if(!event)
{
-# ifdef GLIBMM_EXCEPTIONS_ENABLED
GError* const error = g_error_new(G_FILE_ERROR, G_FILE_ERROR_FAILED,
"Failed to create event for inter-thread communication: %s",
g_win32_error_message(GetLastError()));
throw Glib::FileError(error);
-# else
- warn_failed_pipe_io("CreateEvent"); // TODO: see below
- return;
-# endif
}
fd_receiver_ = event;
@@ -246,19 +233,10 @@ void DispatchNotifier::create_pipe()
if(pipe(filedes) < 0)
{
-# ifdef GLIBMM_EXCEPTIONS_ENABLED
GError* const error = g_error_new(G_FILE_ERROR, g_file_error_from_errno(errno),
"Failed to create pipe for inter-thread communication: %s",
g_strerror(errno));
throw Glib::FileError(error);
-# else
- // TODO: Provide an alternative to the exception. This is not trivial
- // from within a constructor, though. One possibility would be to add
- // a Glib::Dispatcher::valid() method which returns whether construction
- // was successful.
- warn_failed_pipe_io("pipe");
- return;
-# endif
}
fd_set_close_on_exec(filedes[0]);
@@ -408,21 +386,17 @@ bool DispatchNotifier::pipe_io_handler(Glib::IOCondition)
g_return_val_if_fail(data.notifier == this, true);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
// Actually, we wouldn't need the try/catch block because the Glib::Source
// C callback already does it for us. However, we do it anyway because the
// default return value is 'false', which is not what we want.
try
-#endif
{
data.dispatcher->signal_(); // emit
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
catch(...)
{
Glib::exception_handlers_invoke();
}
-#endif
return true;
}