name parameter is const. This fixes a bug in destroy ()

1999-08-20  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel/camel-stream-fs.c (camel_stream_fs_new_with_name):
	name parameter is const. This fixes a bug in destroy ()

svn path=/trunk/; revision=1135
This commit is contained in:
bertrand
1999-08-20 18:37:36 +00:00
committed by Bertrand Guiheneuf
parent 95697142ed
commit 6043cbbc55
5 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,8 @@
1999-08-20 bertrand <Bertrand.Guiheneuf@aful.org>
* camel/camel-stream-fs.c (camel_stream_fs_new_with_name):
name parameter is const. This fixes a bug in destroy ()
1999-08-18 Robert Brady <rwb197@ecs.soton.ac.uk>
* camel/gmime-rfc2047.c: more work on encoder.

View File

@ -106,7 +106,7 @@ _finalize (GtkObject *object)
CamelDataWrapper *camel_data_wrapper = CAMEL_DATA_WRAPPER (object);
CAMEL_LOG_FULL_DEBUG ("Entering CamelDataWrapper::finalize\n");
printf ("CamelDataWrapper::finalize, finalizing object %p\n", object);
CAMEL_LOG_FULL_DEBUG ("CamelDataWrapper::finalize, finalizing object %p\n", object);
if (camel_data_wrapper->mime_type)
gmime_content_field_unref (camel_data_wrapper->mime_type);

View File

@ -52,7 +52,7 @@ camel_stream_fs_class_init (CamelStreamFsClass *camel_stream_fs_class)
CamelStreamClass *camel_stream_class = CAMEL_STREAM_CLASS (camel_stream_fs_class);
GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (camel_stream_fs_class);
parent_class = gtk_type_class (gtk_object_get_type ());
parent_class = gtk_type_class (camel_stream_get_type ());
/* virtual method definition */
@ -111,7 +111,7 @@ _destroy (GtkObject *object)
CAMEL_LOG_FULL_DEBUG ( " Full error text is : %s\n", strerror(errno));
}
GTK_OBJECT_CLASS (parent_class)->destroy (object);
g_free (object);
CAMEL_LOG_FULL_DEBUG ("Leaving CamelStreamFs::destroy\n");
}
@ -132,7 +132,7 @@ _finalize (GtkObject *object)
CamelStream *
camel_stream_fs_new_with_name (gchar *name, CamelStreamFsMode mode)
camel_stream_fs_new_with_name (const gchar *name, CamelStreamFsMode mode)
{
struct stat s;
int v, fd;
@ -165,7 +165,7 @@ camel_stream_fs_new_with_name (gchar *name, CamelStreamFsMode mode)
}
stream_fs = CAMEL_STREAM_FS (camel_stream_fs_new_with_fd (fd));
stream_fs->name = name;
stream_fs->name = g_strdup (name);
return CAMEL_STREAM (stream_fs);

View File

@ -70,7 +70,7 @@ GtkType camel_stream_fs_get_type (void);
/* public methods */
CamelStream *camel_stream_fs_new_with_name (gchar *name, CamelStreamFsMode mode);
CamelStream *camel_stream_fs_new_with_name (const gchar *name, CamelStreamFsMode mode);
CamelStream *camel_stream_fs_new_with_fd (int fd);
#ifdef __cplusplus

View File

@ -24,7 +24,7 @@
#include <config.h>
#include "camel-stream.h"
static CamelStreamClass *parent_class = NULL;
static GtkObjectClass *parent_class = NULL;
/* Returns the class for a CamelMimeMessage */