summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e1d03c3)
raw | patch | inline | side by side (parent: e1d03c3)
author | Ole André Vadla Ravnås <ole.andre.ravnas@tandberg.com> | |
Wed, 7 May 2008 19:24:44 +0000 (19:24 +0000) | ||
committer | Ole André Vadla Ravnås <ole.andre.ravnas@tandberg.com> | |
Wed, 7 May 2008 19:24:44 +0000 (19:24 +0000) |
Original commit message from CVS:
* gst/gstinfo.c (gst_debug_log_valist):
Improved the __FILE__ part of debug output for MSVC.
* gst/gstinfo.c (gst_debug_log_valist):
Improved the __FILE__ part of debug output for MSVC.
ChangeLog | patch | blob | history | |
gst/gstinfo.c | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index 5aa8fb7a83228a920d8dc97819b7179b8e598727..c9e6ce216c37431be7502a3bccd39c46d6e8a750 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2008-05-07 Ole André Vadla Ravnås <ole.andre.ravnas at tandberg com>
+
+ * gst/gstinfo.c (gst_debug_log_valist):
+ Improved the __FILE__ part of debug output for MSVC.
+
2008-05-07 Ole André Vadla Ravnås <ole.andre.ravnas at tandberg com>
* libs/gst/base/gstbasesrc.c (gst_base_src_default_query):
diff --git a/gst/gstinfo.c b/gst/gstinfo.c
index db7333e12a9bca6d3d8ec249b4e4ac0336d60e87..b928049355f53e8da7d01f97c4ce85c2b3ad219b 100644 (file)
--- a/gst/gstinfo.c
+++ b/gst/gstinfo.c
LogFuncEntry *entry;
GSList *handler;
+#ifdef _MSC_VER
+ gchar *file_basename;
+#endif
+
g_return_if_fail (category != NULL);
g_return_if_fail (file != NULL);
g_return_if_fail (function != NULL);
g_return_if_fail (format != NULL);
+#ifdef _MSC_VER
+ /*
+ * The predefined macro __FILE__ is always the exact path given to the
+ * compiler with MSVC, which may or may not be the basename. We work
+ * around it at runtime to improve the readability.
+ */
+ file = file_basename = g_path_get_basename (file);
+#endif
+
message.message = NULL;
message.format = format;
G_VA_COPY (message.arguments, args);
}
g_free (message.message);
va_end (message.arguments);
+
+#ifdef _MSC_VER
+ g_free (file_basename);
+#endif
}
/**