Export moo_(dis|en)able_win32_error_message()
parent
802024b1b7
commit
211c0df811
|
@ -396,9 +396,9 @@ module_open (const char *path)
|
||||||
{
|
{
|
||||||
GModule *module;
|
GModule *module;
|
||||||
|
|
||||||
_moo_disable_win32_error_message ();
|
moo_disable_win32_error_message ();
|
||||||
module = g_module_open (path, G_MODULE_BIND_LAZY);
|
module = g_module_open (path, G_MODULE_BIND_LAZY);
|
||||||
_moo_enable_win32_error_message ();
|
moo_enable_win32_error_message ();
|
||||||
|
|
||||||
if (!module)
|
if (!module)
|
||||||
g_warning ("could not open module '%s': %s", path, g_module_error ());
|
g_warning ("could not open module '%s': %s", path, g_module_error ());
|
||||||
|
|
|
@ -143,9 +143,9 @@ do_load_file (const char *path)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
_moo_disable_win32_error_message ();
|
moo_disable_win32_error_message ();
|
||||||
mod = PyImport_ExecCodeModule (modname, code);
|
mod = PyImport_ExecCodeModule (modname, code);
|
||||||
_moo_enable_win32_error_message ();
|
moo_enable_win32_error_message ();
|
||||||
|
|
||||||
Py_DECREF (code);
|
Py_DECREF (code);
|
||||||
|
|
||||||
|
|
|
@ -675,7 +675,7 @@ run_in_helper (const char *cmd,
|
||||||
sinfo.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
|
sinfo.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
|
||||||
sinfo.wShowWindow = SW_HIDE;
|
sinfo.wShowWindow = SW_HIDE;
|
||||||
|
|
||||||
_moo_disable_win32_error_message ();
|
moo_disable_win32_error_message ();
|
||||||
|
|
||||||
if (! CreateProcess (helper_binary->str, cmd_line, NULL, NULL, TRUE,
|
if (! CreateProcess (helper_binary->str, cmd_line, NULL, NULL, TRUE,
|
||||||
CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP,
|
CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP,
|
||||||
|
@ -686,12 +686,12 @@ run_in_helper (const char *cmd,
|
||||||
"CreateProcess: %s", msg);
|
"CreateProcess: %s", msg);
|
||||||
g_free (msg);
|
g_free (msg);
|
||||||
|
|
||||||
_moo_enable_win32_error_message ();
|
moo_enable_win32_error_message ();
|
||||||
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
_moo_enable_win32_error_message ();
|
moo_enable_win32_error_message ();
|
||||||
|
|
||||||
g_free (cmd_line);
|
g_free (cmd_line);
|
||||||
cmd_line = NULL;
|
cmd_line = NULL;
|
||||||
|
|
|
@ -1586,7 +1586,7 @@ moo_data_dir_type_get_type (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gboolean
|
static gboolean
|
||||||
_moo_debug_enabled (void)
|
_moo_debug_enabled (void)
|
||||||
{
|
{
|
||||||
#ifndef MOO_DEBUG
|
#ifndef MOO_DEBUG
|
||||||
|
@ -1684,7 +1684,7 @@ G_GNUC_UNUSED static guint
|
||||||
saved_win32_error_mode;
|
saved_win32_error_mode;
|
||||||
|
|
||||||
void
|
void
|
||||||
_moo_disable_win32_error_message (void)
|
moo_disable_win32_error_message (void)
|
||||||
{
|
{
|
||||||
#if defined(__WIN32__)
|
#if defined(__WIN32__)
|
||||||
if (!_moo_debug_enabled ())
|
if (!_moo_debug_enabled ())
|
||||||
|
@ -1693,7 +1693,7 @@ _moo_disable_win32_error_message (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_moo_enable_win32_error_message (void)
|
moo_enable_win32_error_message (void)
|
||||||
{
|
{
|
||||||
#if defined(__WIN32__)
|
#if defined(__WIN32__)
|
||||||
if (!_moo_debug_enabled ())
|
if (!_moo_debug_enabled ())
|
||||||
|
|
|
@ -48,12 +48,11 @@ void moo_set_log_func_silent (void);
|
||||||
void moo_reset_log_func (void);
|
void moo_reset_log_func (void);
|
||||||
|
|
||||||
void moo_segfault (void);
|
void moo_segfault (void);
|
||||||
gboolean _moo_debug_enabled (void) G_GNUC_CONST;
|
|
||||||
void _moo_message (const char *format,
|
void _moo_message (const char *format,
|
||||||
...);
|
...);
|
||||||
|
|
||||||
void _moo_disable_win32_error_message(void);
|
void moo_disable_win32_error_message (void);
|
||||||
void _moo_enable_win32_error_message (void);
|
void moo_enable_win32_error_message (void);
|
||||||
|
|
||||||
#define MOO_TYPE_DATA_DIR_TYPE (moo_data_dir_type_get_type ())
|
#define MOO_TYPE_DATA_DIR_TYPE (moo_data_dir_type_get_type ())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue