From 211c0df811e5afe9c8e282cf013cbd23223b4fa4 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Thu, 23 Nov 2006 23:08:22 -0600 Subject: [PATCH] Export moo_(dis|en)able_win32_error_message() --- moo/mooedit/mooplugin-loader.c | 4 ++-- moo/moopython/moopython-loader.c | 4 ++-- moo/mooterm/mootermpt-cygwin.c | 6 +++--- moo/mooutils/mooutils-misc.c | 6 +++--- moo/mooutils/mooutils-misc.h | 5 ++--- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/moo/mooedit/mooplugin-loader.c b/moo/mooedit/mooplugin-loader.c index 80435c45..ceda801b 100644 --- a/moo/mooedit/mooplugin-loader.c +++ b/moo/mooedit/mooplugin-loader.c @@ -396,9 +396,9 @@ module_open (const char *path) { GModule *module; - _moo_disable_win32_error_message (); + moo_disable_win32_error_message (); module = g_module_open (path, G_MODULE_BIND_LAZY); - _moo_enable_win32_error_message (); + moo_enable_win32_error_message (); if (!module) g_warning ("could not open module '%s': %s", path, g_module_error ()); diff --git a/moo/moopython/moopython-loader.c b/moo/moopython/moopython-loader.c index cdf175f8..bfb8c230 100644 --- a/moo/moopython/moopython-loader.c +++ b/moo/moopython/moopython-loader.c @@ -143,9 +143,9 @@ do_load_file (const char *path) goto out; } - _moo_disable_win32_error_message (); + moo_disable_win32_error_message (); mod = PyImport_ExecCodeModule (modname, code); - _moo_enable_win32_error_message (); + moo_enable_win32_error_message (); Py_DECREF (code); diff --git a/moo/mooterm/mootermpt-cygwin.c b/moo/mooterm/mootermpt-cygwin.c index faf93972..b78d10eb 100644 --- a/moo/mooterm/mootermpt-cygwin.c +++ b/moo/mooterm/mootermpt-cygwin.c @@ -675,7 +675,7 @@ run_in_helper (const char *cmd, sinfo.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES; sinfo.wShowWindow = SW_HIDE; - _moo_disable_win32_error_message (); + moo_disable_win32_error_message (); if (! CreateProcess (helper_binary->str, cmd_line, NULL, NULL, TRUE, CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP, @@ -686,12 +686,12 @@ run_in_helper (const char *cmd, "CreateProcess: %s", msg); g_free (msg); - _moo_enable_win32_error_message (); + moo_enable_win32_error_message (); goto error; } - _moo_enable_win32_error_message (); + moo_enable_win32_error_message (); g_free (cmd_line); cmd_line = NULL; diff --git a/moo/mooutils/mooutils-misc.c b/moo/mooutils/mooutils-misc.c index d4c5b743..fdc39609 100644 --- a/moo/mooutils/mooutils-misc.c +++ b/moo/mooutils/mooutils-misc.c @@ -1586,7 +1586,7 @@ moo_data_dir_type_get_type (void) } -gboolean +static gboolean _moo_debug_enabled (void) { #ifndef MOO_DEBUG @@ -1684,7 +1684,7 @@ G_GNUC_UNUSED static guint saved_win32_error_mode; void -_moo_disable_win32_error_message (void) +moo_disable_win32_error_message (void) { #if defined(__WIN32__) if (!_moo_debug_enabled ()) @@ -1693,7 +1693,7 @@ _moo_disable_win32_error_message (void) } void -_moo_enable_win32_error_message (void) +moo_enable_win32_error_message (void) { #if defined(__WIN32__) if (!_moo_debug_enabled ()) diff --git a/moo/mooutils/mooutils-misc.h b/moo/mooutils/mooutils-misc.h index ea0df10c..6bac2fee 100644 --- a/moo/mooutils/mooutils-misc.h +++ b/moo/mooutils/mooutils-misc.h @@ -48,12 +48,11 @@ void moo_set_log_func_silent (void); void moo_reset_log_func (void); void moo_segfault (void); -gboolean _moo_debug_enabled (void) G_GNUC_CONST; void _moo_message (const char *format, ...); -void _moo_disable_win32_error_message(void); -void _moo_enable_win32_error_message (void); +void moo_disable_win32_error_message (void); +void moo_enable_win32_error_message (void); #define MOO_TYPE_DATA_DIR_TYPE (moo_data_dir_type_get_type ())