[glibmm] Glib::Error::register_init(): Call Glib::wrap_register_init()
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Glib::Error::register_init(): Call Glib::wrap_register_init()
- Date: Sun, 25 Jan 2015 15:26:30 +0000 (UTC)
commit 10e24926a149c8dbfbc5853b2d4ff5a4cd50bc4b
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Sun Jan 25 16:23:22 2015 +0100
Glib::Error::register_init(): Call Glib::wrap_register_init()
* glib/glibmm/error.cc: Call wrap_register_init() before wrap_init().
It was not necessary, when Error::register_init() was called from Glib::init(),
but Error::register_init() can be called from other places (Glib::thread_init()
and Glib::Error::throw_exception()).
* glib/glibmm/init.cc: Not necessary to call Glib::wrap_register_init() before
calling Glib::Error::register_init(). Bug #743466 (Mike Fleetwood).
glib/glibmm/error.cc | 6 ++----
glib/glibmm/init.cc | 10 +++-------
2 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/glib/glibmm/error.cc b/glib/glibmm/error.cc
index fe01cc6..5784414 100644
--- a/glib/glibmm/error.cc
+++ b/glib/glibmm/error.cc
@@ -1,5 +1,3 @@
-// -*- c++ -*-
-
/* error.cc
*
* Copyright 2002 The gtkmm Development Team
@@ -21,6 +19,7 @@
#include <glibmmconfig.h>
#include <glibmm/error.h>
+#include <glibmm/wrap.h>
#include <glibmm/wrap_init.h>
#include <glib.h>
#include <map>
@@ -131,6 +130,7 @@ void Error::register_init()
if(!throw_func_table)
{
throw_func_table = new ThrowFuncTable();
+ Glib::wrap_register_init();
Glib::wrap_init(); // make sure that at least the Glib exceptions are registered
}
}
@@ -176,6 +176,4 @@ void Error::throw_exception(GError* gobject)
throw Glib::Error(gobject);
}
-
} // namespace Glib
-
diff --git a/glib/glibmm/init.cc b/glib/glibmm/init.cc
index 0710f3f..9255560 100644
--- a/glib/glibmm/init.cc
+++ b/glib/glibmm/init.cc
@@ -1,6 +1,3 @@
-// -*- c++ -*-
-/* $Id$ */
-
/* Copyright (C) 2003 The glibmm Development Team
*
* This library is free software; you can redistribute it and/or
@@ -18,7 +15,7 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <glibmm/wrap.h>
+#include <glibmm/init.h>
#include <glibmm/error.h>
namespace Glib
@@ -26,9 +23,8 @@ namespace Glib
void init()
{
- Glib::wrap_register_init();
- Glib::Error::register_init(); //also calls Glib::wrap_init();
+ // Also calls Glib::wrap_register_init() and Glib::wrap_init().
+ Glib::Error::register_init();
}
} // namespace Glib
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]