diff src/gripes.cc @ 5602:dfa2da0563e5

[project @ 2006-01-31 03:43:40 by jwe]
author jwe
date Tue, 31 Jan 2006 03:43:41 +0000
parents 4c8a2e4e0717
children ca40a52804f4
line wrap: on
line diff
--- a/src/gripes.cc	Sat Jan 21 20:08:33 2006 +0000
+++ b/src/gripes.cc	Tue Jan 31 03:43:41 2006 +0000
@@ -124,12 +124,18 @@
 }
 
 void
-gripe_wrong_type_arg (const char *name, const std::string& s, bool is_error)
+gripe_wrong_type_arg (const char *name, const char *s, bool is_error)
 {
   if (is_error)
-    error ("%s: wrong type argument `%s'", name, s.c_str ());
+    error ("%s: wrong type argument `%s'", name, s);
   else
-    warning ("%s: wrong type argument `%s'", name, s.c_str ());
+    warning ("%s: wrong type argument `%s'", name, s);
+}
+
+void
+gripe_wrong_type_arg (const char *name, const std::string& s, bool is_error)
+{
+  gripe_wrong_type_arg (name, s.c_str (), is_error);
 }
 
 void
@@ -138,10 +144,7 @@
 {
   std::string type = tc.type_name ();
 
-  if (is_error)
-    error ("%s: wrong type argument `%s'", name, type.c_str ());
-  else
-    warning ("%s: wrong type argument `%s'", name, type.c_str ());
+  gripe_wrong_type_arg (name, type, is_error);
 }
 
 void