Hi,
I committed this patch which replaces some g_strconcat calls with macros.
Tom
2006-06-09 Thomas Fitzsimmons <[EMAIL PROTECTED]>
* native/plugin/gcjwebplugin.cc (PLUGIN_ERROR_THREE): New macro.
(NP_Initialize): Use PLUGIN_ERROR_THREE in place of g_strconcat.
Index: native/plugin/gcjwebplugin.cc
===================================================================
RCS file: /sources/classpath/classpath/native/plugin/gcjwebplugin.cc,v
retrieving revision 1.10
diff -u -r1.10 gcjwebplugin.cc
--- native/plugin/gcjwebplugin.cc 8 Jun 2006 21:49:11 -0000 1.10
+++ native/plugin/gcjwebplugin.cc 9 Jun 2006 14:52:17 -0000
@@ -79,6 +79,10 @@
g_printerr ("%s:%d: thread %p: Error: %s: %s\n", __FILE__, __LINE__, \
g_thread_self (), first, second)
+#define PLUGIN_ERROR_THREE(first, second, third) \
+ g_printerr ("%s:%d: thread %p: Error: %s: %s: %s\n", __FILE__, \
+ __LINE__, g_thread_self (), first, second, third)
+
// Plugin information passed to about:plugins.
#define PLUGIN_NAME "GCJ Web Browser Plugin"
#define PLUGIN_DESC "The " PLUGIN_NAME " executes Java applets."
@@ -1621,9 +1625,9 @@
file_error = g_mkdir (data_directory, 0700);
if (file_error != 0)
{
- PLUGIN_ERROR_TWO (g_strconcat("Failed to create data directory ",
- data_directory, NULL),
- strerror (errno));
+ PLUGIN_ERROR_THREE ("Failed to create data directory",
+ data_directory,
+ strerror (errno));
return NPERR_GENERIC_ERROR;
}
}
@@ -1635,16 +1639,16 @@
{
if (channel_error)
{
- PLUGIN_ERROR_TWO (g_strconcat("Failed to open whitelist file ",
- whitelist_filename, NULL),
- channel_error->message);
+ PLUGIN_ERROR_THREE ("Failed to open whitelist file",
+ whitelist_filename,
+ channel_error->message);
g_error_free (channel_error);
channel_error = NULL;
}
else
- PLUGIN_ERROR (g_strconcat("Failed to open whitelist file ",
- whitelist_filename, NULL));
-
+ PLUGIN_ERROR_TWO ("Failed to open whitelist file",
+ whitelist_filename);
+
return NPERR_GENERIC_ERROR;
}