summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2006-06-05 17:32:14 +0000
committerMurray Cumming <murrayc@src.gnome.org>2006-06-05 17:32:14 +0000
commitcb07728aed463aff15be0dcbdd52951c5cd154ac (patch)
tree0d2288a8c2a09dc4e3b35d901da98b6ac0f8f75b
parent9ed16fbdd8c03dafed32babb6e41f876e2fb19fc (diff)
downloadglibmm-cb07728aed463aff15be0dcbdd52951c5cd154ac.tar.gz
When using --enable-api-exception=no, only try to get the Glib::Error when
2006-06-05 Murray Cumming <murrayc@murrayc.com> * glib/src/convert.ccg: When using --enable-api-exception=no, only try to get the Glib::Error when the GError is not null.
-rw-r--r--ChangeLog5
-rw-r--r--glib/src/convert.ccg24
2 files changed, 17 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index f24ef1a0..68c8a45e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-05 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/src/convert.ccg: When using --enable-api-exception=no, only try to get the Glib::Error
+ when the GError is not null.
+
2006-05-18 Murray Cumming <murrayc@murrayc.com>
* tools/m4/method.m4: _METHOD(): When using errthrow, actually print the function call even if
diff --git a/glib/src/convert.ccg b/glib/src/convert.ccg
index 9a4dae14..5ea705a3 100644
--- a/glib/src/convert.ccg
+++ b/glib/src/convert.ccg
@@ -94,7 +94,7 @@ std::string IConv::convert(const std::string& str, std::auto_ptr<Glib::Error>& e
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror) ::Glib::Error::throw_exception(gerror);
#else
- error = ::Glib::Error::throw_exception(gerror);
+ if(gerror) error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
return std::string(ScopedPtr<char>(buf).get(), bytes_written);
@@ -138,7 +138,7 @@ std::string convert(const std::string& str,
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror) ::Glib::Error::throw_exception(gerror);
#else
- error = ::Glib::Error::throw_exception(gerror);
+ if(gerror) error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
return std::string(ScopedPtr<char>(buf).get(), bytes_written);
@@ -165,7 +165,7 @@ std::string convert_with_fallback(const std::string& str,
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror) ::Glib::Error::throw_exception(gerror);
#else
- error = ::Glib::Error::throw_exception(gerror);
+ if(gerror) error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
return std::string(ScopedPtr<char>(buf).get(), bytes_written);
@@ -194,7 +194,7 @@ std::string convert_with_fallback(const std::string& str,
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror) ::Glib::Error::throw_exception(gerror);
#else
- error = ::Glib::Error::throw_exception(gerror);
+ if(gerror) error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
return std::string(ScopedPtr<char>(buf).get(), bytes_written);
@@ -216,7 +216,7 @@ Glib::ustring locale_to_utf8(const std::string& opsys_string, std::auto_ptr<Glib
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror) ::Glib::Error::throw_exception(gerror);
#else
- error = ::Glib::Error::throw_exception(gerror);
+ if(gerror) error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
const ScopedPtr<char> scoped_buf (buf);
@@ -239,7 +239,7 @@ std::string locale_from_utf8(const Glib::ustring& utf8_string, std::auto_ptr<Gli
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror) ::Glib::Error::throw_exception(gerror);
#else
- error = ::Glib::Error::throw_exception(gerror);
+ if(gerror) error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
return std::string(ScopedPtr<char>(buf).get(), bytes_written);
@@ -261,7 +261,7 @@ Glib::ustring filename_to_utf8(const std::string& opsys_string, std::auto_ptr<Gl
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror) ::Glib::Error::throw_exception(gerror);
#else
- error = ::Glib::Error::throw_exception(gerror);
+ if(gerror) error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
const ScopedPtr<char> scoped_buf (buf);
@@ -284,7 +284,7 @@ std::string filename_from_utf8(const Glib::ustring& utf8_string, std::auto_ptr<G
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror) ::Glib::Error::throw_exception(gerror);
#else
- error = ::Glib::Error::throw_exception(gerror);
+ if(gerror) error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
return std::string(ScopedPtr<char>(buf).get(), bytes_written);
@@ -305,7 +305,7 @@ std::string filename_from_uri(const Glib::ustring& uri, Glib::ustring& hostname,
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror) ::Glib::Error::throw_exception(gerror);
#else
- error = ::Glib::Error::throw_exception(gerror);
+ if(gerror) error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
// Let's take ownership at this point.
@@ -332,7 +332,7 @@ std::string filename_from_uri(const Glib::ustring& uri, std::auto_ptr<Glib::Erro
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror) ::Glib::Error::throw_exception(gerror);
#else
- error = ::Glib::Error::throw_exception(gerror);
+ if(gerror) error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
return std::string(ScopedPtr<char>(buf).get());
@@ -351,7 +351,7 @@ Glib::ustring filename_to_uri(const std::string& filename, const Glib::ustring&
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror) ::Glib::Error::throw_exception(gerror);
#else
- error = ::Glib::Error::throw_exception(gerror);
+ if(gerror) error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
return Glib::ustring(ScopedPtr<char>(buf).get());
@@ -370,7 +370,7 @@ Glib::ustring filename_to_uri(const std::string& filename, std::auto_ptr<Glib::E
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror) ::Glib::Error::throw_exception(gerror);
#else
- error = ::Glib::Error::throw_exception(gerror);
+ if(gerror) error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
return Glib::ustring(ScopedPtr<char>(buf).get());