diff options
author | Murray Cumming <murrayc@murrayc.com> | 2010-05-31 13:16:28 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2010-05-31 13:16:28 +0200 |
commit | de7e9208edb460830accf5835afcbbf9ac4d212b (patch) | |
tree | d74cd224716e60e11723a3ba2777f1a757c218fe /glib/src/spawn.ccg | |
parent | f510673363137d691f5063bc68d9fa7bb3ef9709 (diff) | |
download | glibmm-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/src/spawn.ccg')
-rw-r--r-- | glib/src/spawn.ccg | 116 |
1 files changed, 0 insertions, 116 deletions
diff --git a/glib/src/spawn.ccg b/glib/src/spawn.ccg index 10d9d7f4..b526c394 100644 --- a/glib/src/spawn.ccg +++ b/glib/src/spawn.ccg @@ -35,18 +35,14 @@ extern "C" */ static void child_setup_callback(void* user_data) { - #ifdef GLIBMM_EXCEPTIONS_ENABLED try { - #endif //GLIBMM_EXCEPTIONS_ENABLED (*reinterpret_cast<sigc::slot<void>*>(user_data))(); - #ifdef GLIBMM_EXCEPTIONS_ENABLED } catch(...) { Glib::exception_handlers_invoke(); } - #endif //GLIBMM_EXCEPTIONS_ENABLED } static void copy_output_buf(std::string* dest, const char* buf) @@ -70,7 +66,6 @@ namespace Glib /**** process spawning functions *******************************************/ -#ifdef GLIBMM_EXCEPTIONS_ENABLED void spawn_async_with_pipes(const std::string& working_directory, const Glib::ArrayHandle<std::string>& argv, const Glib::ArrayHandle<std::string>& envp, @@ -80,17 +75,6 @@ void spawn_async_with_pipes(const std::string& working_directory, int* standard_input, int* standard_output, int* standard_error) -#else -void spawn_async_with_pipes(const std::string& working_directory, - const Glib::ArrayHandle<std::string>& argv, - const Glib::ArrayHandle<std::string>& envp, - SpawnFlags flags, - const sigc::slot<void>& child_setup, - Pid* child_pid, - int* standard_input, - int* standard_output, - int* standard_error, std::auto_ptr<Glib::Error>& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED { const bool setup_slot = !child_setup.empty(); sigc::slot<void> child_setup_ = child_setup; @@ -107,16 +91,10 @@ void spawn_async_with_pipes(const std::string& working_directory, standard_input, standard_output, standard_error, &gerror); - #ifdef GLIBMM_EXCEPTIONS_ENABLED if(gerror) Glib::Error::throw_exception(gerror); - #else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED } -#ifdef GLIBMM_EXCEPTIONS_ENABLED void spawn_async_with_pipes(const std::string& working_directory, const Glib::ArrayHandle<std::string>& argv, SpawnFlags flags, @@ -125,16 +103,6 @@ void spawn_async_with_pipes(const std::string& working_directory, int* standard_input, int* standard_output, int* standard_error) -#else -void spawn_async_with_pipes(const std::string& working_directory, - const Glib::ArrayHandle<std::string>& argv, - SpawnFlags flags, - const sigc::slot<void>& child_setup, - Pid* child_pid, - int* standard_input, - int* standard_output, - int* standard_error, std::auto_ptr<Glib::Error>& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED { const bool setup_slot = !child_setup.empty(); sigc::slot<void> child_setup_ = child_setup; @@ -150,30 +118,16 @@ void spawn_async_with_pipes(const std::string& working_directory, standard_input, standard_output, standard_error, &gerror); - #ifdef GLIBMM_EXCEPTIONS_ENABLED if(gerror) Glib::Error::throw_exception(gerror); - #else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED } -#ifdef GLIBMM_EXCEPTIONS_ENABLED void spawn_async(const std::string& working_directory, const Glib::ArrayHandle<std::string>& argv, const Glib::ArrayHandle<std::string>& envp, SpawnFlags flags, const sigc::slot<void>& child_setup, Pid* child_pid) -#else -void spawn_async(const std::string& working_directory, - const Glib::ArrayHandle<std::string>& argv, - const Glib::ArrayHandle<std::string>& envp, - SpawnFlags flags, - const sigc::slot<void>& child_setup, - Pid* child_pid, std::auto_ptr<Glib::Error>& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED { const bool setup_slot = !child_setup.empty(); sigc::slot<void> child_setup_ = child_setup; @@ -189,28 +143,15 @@ void spawn_async(const std::string& working_directory, child_pid, &gerror); - #ifdef GLIBMM_EXCEPTIONS_ENABLED if(gerror) Glib::Error::throw_exception(gerror); - #else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED } -#ifdef GLIBMM_EXCEPTIONS_ENABLED void spawn_async(const std::string& working_directory, const Glib::ArrayHandle<std::string>& argv, SpawnFlags flags, const sigc::slot<void>& child_setup, Pid* child_pid) -#else -void spawn_async(const std::string& working_directory, - const Glib::ArrayHandle<std::string>& argv, - SpawnFlags flags, - const sigc::slot<void>& child_setup, - Pid* child_pid, std::auto_ptr<Glib::Error>& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED { const bool setup_slot = !child_setup.empty(); sigc::slot<void> child_setup_ = child_setup; @@ -225,16 +166,10 @@ void spawn_async(const std::string& working_directory, child_pid, &gerror); - #ifdef GLIBMM_EXCEPTIONS_ENABLED if(gerror) Glib::Error::throw_exception(gerror); - #else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED } -#ifdef GLIBMM_EXCEPTIONS_ENABLED void spawn_sync(const std::string& working_directory, const Glib::ArrayHandle<std::string>& argv, const Glib::ArrayHandle<std::string>& envp, @@ -243,16 +178,6 @@ void spawn_sync(const std::string& working_directory, std::string* standard_output, std::string* standard_error, int* exit_status) -#else -void spawn_sync(const std::string& working_directory, - const Glib::ArrayHandle<std::string>& argv, - const Glib::ArrayHandle<std::string>& envp, - SpawnFlags flags, - const sigc::slot<void>& child_setup, - std::string* standard_output, - std::string* standard_error, - int* exit_status, std::auto_ptr<Glib::Error>& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED { const bool setup_slot = !child_setup.empty(); sigc::slot<void> child_setup_ = child_setup; @@ -273,19 +198,13 @@ void spawn_sync(const std::string& working_directory, exit_status, &gerror); - #ifdef GLIBMM_EXCEPTIONS_ENABLED if(gerror) Glib::Error::throw_exception(gerror); - #else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED copy_output_buf(standard_output, buf_standard_output.get()); copy_output_buf(standard_error, buf_standard_error.get()); } -#ifdef GLIBMM_EXCEPTIONS_ENABLED void spawn_sync(const std::string& working_directory, const Glib::ArrayHandle<std::string>& argv, SpawnFlags flags, @@ -293,15 +212,6 @@ void spawn_sync(const std::string& working_directory, std::string* standard_output, std::string* standard_error, int* exit_status) -#else -void spawn_sync(const std::string& working_directory, - const Glib::ArrayHandle<std::string>& argv, - SpawnFlags flags, - const sigc::slot<void>& child_setup, - std::string* standard_output, - std::string* standard_error, - int* exit_status, std::auto_ptr<Glib::Error>& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED { const bool setup_slot = !child_setup.empty(); sigc::slot<void> child_setup_ = child_setup; @@ -321,47 +231,26 @@ void spawn_sync(const std::string& working_directory, exit_status, &gerror); - #ifdef GLIBMM_EXCEPTIONS_ENABLED if(gerror) Glib::Error::throw_exception(gerror); - #else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED copy_output_buf(standard_output, buf_standard_output.get()); copy_output_buf(standard_error, buf_standard_error.get()); } -#ifdef GLIBMM_EXCEPTIONS_ENABLED void spawn_command_line_async(const std::string& command_line) -#else -void spawn_command_line_async(const std::string& command_line, std::auto_ptr<Glib::Error>& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED { GError* gerror = 0; g_spawn_command_line_async(command_line.c_str(), &gerror); - #ifdef GLIBMM_EXCEPTIONS_ENABLED if(gerror) Glib::Error::throw_exception(gerror); - #else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED } -#ifdef GLIBMM_EXCEPTIONS_ENABLED void spawn_command_line_sync(const std::string& command_line, std::string* standard_output, std::string* standard_error, int* exit_status) -#else -void spawn_command_line_sync(const std::string& command_line, - std::string* standard_output, - std::string* standard_error, - int* exit_status, std::auto_ptr<Glib::Error>& error) -#endif //GLIBMM_EXCEPTIONS_ENABLED { Glib::ScopedPtr<char> buf_standard_output; Glib::ScopedPtr<char> buf_standard_error; @@ -374,13 +263,8 @@ void spawn_command_line_sync(const std::string& command_line, exit_status, &gerror); - #ifdef GLIBMM_EXCEPTIONS_ENABLED if(gerror) Glib::Error::throw_exception(gerror); - #else - if(gerror) - error = ::Glib::Error::throw_exception(gerror); - #endif //GLIBMM_EXCEPTIONS_ENABLED copy_output_buf(standard_output, buf_standard_output.get()); copy_output_buf(standard_error, buf_standard_error.get()); |