Fix the default implementation for CamelService::get_name() so that it

returns a malloced string instead of a static one.  (A static one
breaks the semantics of the method.)

svn path=/trunk/; revision=6483
This commit is contained in:
Ettore Perazzoli
2000-11-07 18:37:30 +00:00
parent 3045084721
commit be043c8ce6
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2000-11-07 Ettore Perazzoli <ettore@helixcode.com>
* camel-service.c (get_name): Strdup the "???" string you return,
so that the expected semantics for `::get_name()' is respected.
2000-11-07 Dan Winship <danw@helixcode.com>
* camel-stream-filter.c (d): Kill debugging, as it causes lots of

View File

@ -287,7 +287,7 @@ get_name (CamelService *service, gboolean brief)
{
g_warning ("CamelService::get_name not implemented for `%s'",
camel_type_to_name (CAMEL_OBJECT_GET_TYPE (service)));
return "???";
return g_strdup ("???");
}
/**