[gtk+] Use G_STRLOC instead __FILE__ and __LINE__
- From: Tor Lillqvist <tml src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+] Use G_STRLOC instead __FILE__ and __LINE__
- Date: Wed, 21 Oct 2009 18:49:14 +0000 (UTC)
commit 98ea183c1322559b2a92cfdc1cd0146267c37f1d
Author: Javier Jardon <jjardon gnome org>
Date: Wed Oct 21 21:46:44 2009 +0300
Use G_STRLOC instead __FILE__ and __LINE__
Patch from bug #599225
gdk/win32/gdkmain-win32.c | 6 ++----
gdk/win32/gdkprivate-win32.h | 12 ++----------
2 files changed, 4 insertions(+), 14 deletions(-)
---
diff --git a/gdk/win32/gdkmain-win32.c b/gdk/win32/gdkmain-win32.c
index 5142dae..49bd59e 100644
--- a/gdk/win32/gdkmain-win32.c
+++ b/gdk/win32/gdkmain-win32.c
@@ -118,20 +118,18 @@ _gdk_windowing_init (void)
void
_gdk_win32_api_failed (const gchar *where,
- gint line,
const gchar *api)
{
gchar *msg = g_win32_error_message (GetLastError ());
- g_warning ("%s:%d: %s failed: %s", where, line, api, msg);
+ g_warning ("%s: %s failed: %s", where, api, msg);
g_free (msg);
}
void
_gdk_other_api_failed (const gchar *where,
- gint line,
const gchar *api)
{
- g_warning ("%s:%d: %s failed", where, line, api);
+ g_warning ("%s: %s failed", where, api);
}
void
diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h
index a2f653c..26e5e7d 100644
--- a/gdk/win32/gdkprivate-win32.h
+++ b/gdk/win32/gdkprivate-win32.h
@@ -349,21 +349,13 @@ gchar *_gdk_win32_gdkregion_to_string (const GdkRegion *box);
gchar *_gdk_win32_last_error_string (void);
void _gdk_win32_api_failed (const gchar *where,
- gint line,
const gchar *api);
void _gdk_other_api_failed (const gchar *where,
- gint line,
const gchar *api);
-#if defined(__GNUC__) && (__GNUC__ < 3)
-#define WIN32_API_FAILED(api) _gdk_win32_api_failed (__FILE__ ":" __PRETTY_FUNCTION__, __LINE__, api)
+#define WIN32_API_FAILED(api) _gdk_win32_api_failed (G_STRLOC , api)
#define WIN32_GDI_FAILED(api) WIN32_API_FAILED (api)
-#define OTHER_API_FAILED(api) _gdk_other_api_failed (__FILE__ ":" __PRETTY_FUNCTION__, __LINE__, api)
-#else
-#define WIN32_API_FAILED(api) _gdk_win32_api_failed (__FILE__, __LINE__, api)
-#define WIN32_GDI_FAILED(api) WIN32_API_FAILED (api)
-#define OTHER_API_FAILED(api) _gdk_other_api_failed (__FILE__, __LINE__, api)
-#endif
+#define OTHER_API_FAILED(api) _gdk_other_api_failed (G_STRLOC, api)
/* These two macros call a GDI or other Win32 API and if the return
* value is zero or NULL, print a warning message. The majority of GDI
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]