[gmime] Renamed various _destroy() functions to _free()



commit c0295bff8ca348ef77ef788ef773eec4bc8cd30b
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date:   Wed Mar 15 10:27:06 2017 -0400

    Renamed various _destroy() functions to _free()

 gmime/gmime-content-type.c |    6 +++---
 gmime/gmime-disposition.c  |    6 +++---
 gmime/gmime-events.c       |    6 +++---
 gmime/gmime-events.h       |    2 +-
 gmime/gmime-header.c       |    6 +++---
 gmime/gmime-header.h       |    3 +--
 gmime/gmime-object.c       |    2 +-
 gmime/gmime-param.c        |    6 +++---
 gmime/gmime-param.h        |    2 +-
 tests/test-headers.c       |    2 +-
 10 files changed, 20 insertions(+), 21 deletions(-)
---
diff --git a/gmime/gmime-content-type.c b/gmime/gmime-content-type.c
index 2e183af..3a8e477 100644
--- a/gmime/gmime-content-type.c
+++ b/gmime/gmime-content-type.c
@@ -112,8 +112,8 @@ g_mime_content_type_finalize (GObject *object)
        GMimeContentType *content_type = (GMimeContentType *) object;
        
        g_hash_table_destroy (content_type->param_hash);
-       g_mime_param_destroy (content_type->params);
-       g_mime_event_destroy (content_type->priv);
+       g_mime_param_free (content_type->params);
+       g_mime_event_free (content_type->priv);
        g_free (content_type->subtype);
        g_free (content_type->type);
        
@@ -364,7 +364,7 @@ g_mime_content_type_set_params (GMimeContentType *mime_type, GMimeParam *params)
        
        /* clear the current list/hash */
        g_hash_table_remove_all (mime_type->param_hash);
-       g_mime_param_destroy (mime_type->params);
+       g_mime_param_free (mime_type->params);
        mime_type->params = params;
        
        while (params != NULL) {
diff --git a/gmime/gmime-disposition.c b/gmime/gmime-disposition.c
index c27f229..2fd026d 100644
--- a/gmime/gmime-disposition.c
+++ b/gmime/gmime-disposition.c
@@ -100,8 +100,8 @@ g_mime_content_disposition_finalize (GObject *object)
        GMimeContentDisposition *disposition = (GMimeContentDisposition *) object;
        
        g_hash_table_destroy (disposition->param_hash);
-       g_mime_param_destroy (disposition->params);
-       g_mime_event_destroy (disposition->priv);
+       g_mime_param_free (disposition->params);
+       g_mime_event_free (disposition->priv);
        g_free (disposition->disposition);
        
        G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -230,7 +230,7 @@ g_mime_content_disposition_set_params (GMimeContentDisposition *disposition, GMi
        
        /* destroy the current list/hash */
        g_hash_table_remove_all (disposition->param_hash);
-       g_mime_param_destroy (disposition->params);
+       g_mime_param_free (disposition->params);
        disposition->params = params;
        
        while (params != NULL) {
diff --git a/gmime/gmime-events.c b/gmime/gmime-events.c
index 3cf491c..e1a6935 100644
--- a/gmime/gmime-events.c
+++ b/gmime/gmime-events.c
@@ -84,13 +84,13 @@ g_mime_event_new (gpointer owner)
 
 
 /**
- * g_mime_event_destroy:
+ * g_mime_event_free:
  * @event: a #GMimeEvent
  *
- * Destroys an event context.
+ * Frees an event context.
  **/
 void
-g_mime_event_destroy (GMimeEvent *event)
+g_mime_event_free (GMimeEvent *event)
 {
        EventListener *node, *next;
        
diff --git a/gmime/gmime-events.h b/gmime/gmime-events.h
index 7eca89d..5c63c93 100644
--- a/gmime/gmime-events.h
+++ b/gmime/gmime-events.h
@@ -31,7 +31,7 @@ typedef void (* GMimeEventCallback) (gpointer sender, gpointer args, gpointer us
 typedef struct _GMimeEvent GMimeEvent;
 
 G_GNUC_INTERNAL GMimeEvent *g_mime_event_new (gpointer owner);
-G_GNUC_INTERNAL void g_mime_event_destroy (GMimeEvent *event);
+G_GNUC_INTERNAL void g_mime_event_free (GMimeEvent *event);
 
 G_GNUC_INTERNAL void g_mime_event_add (GMimeEvent *event, GMimeEventCallback callback, gpointer user_data);
 G_GNUC_INTERNAL void g_mime_event_remove (GMimeEvent *event, GMimeEventCallback callback, gpointer 
user_data);
diff --git a/gmime/gmime-header.c b/gmime/gmime-header.c
index 358b0e2..a9fd22e 100644
--- a/gmime/gmime-header.c
+++ b/gmime/gmime-header.c
@@ -300,13 +300,13 @@ g_mime_header_list_new (GMimeParserOptions *options)
 
 
 /**
- * g_mime_header_list_destroy:
+ * g_mime_header_list_free:
  * @headers: a #GMimeHeaderList
  *
- * Destroy the header list.
+ * Frees the header list.
  **/
 void
-g_mime_header_list_destroy (GMimeHeaderList *headers)
+g_mime_header_list_free (GMimeHeaderList *headers)
 {
        guint i;
        
diff --git a/gmime/gmime-header.h b/gmime/gmime-header.h
index ae49ec9..8d29669 100644
--- a/gmime/gmime-header.h
+++ b/gmime/gmime-header.h
@@ -69,8 +69,7 @@ ssize_t g_mime_header_write_to_stream (GMimeHeader *header, GMimeStream *stream)
 typedef struct _GMimeHeaderList GMimeHeaderList;
 
 GMimeHeaderList *g_mime_header_list_new (GMimeParserOptions *options);
-
-void g_mime_header_list_destroy (GMimeHeaderList *headers);
+void g_mime_header_list_free (GMimeHeaderList *headers);
 
 void g_mime_header_list_clear (GMimeHeaderList *headers);
 int g_mime_header_list_get_count (GMimeHeaderList *headers);
diff --git a/gmime/gmime-object.c b/gmime/gmime-object.c
index 05ace4c..366b36a 100644
--- a/gmime/gmime-object.c
+++ b/gmime/gmime-object.c
@@ -169,7 +169,7 @@ g_mime_object_finalize (GObject *object)
        if (mime->headers) {
                event = _g_mime_header_list_get_changed_event (mime->headers);
                g_mime_event_remove (event, (GMimeEventCallback) header_list_changed, object);
-               g_mime_header_list_destroy (mime->headers);
+               g_mime_header_list_free (mime->headers);
        }
        
        g_free (mime->content_id);
diff --git a/gmime/gmime-param.c b/gmime/gmime-param.c
index d4e809a..2d1033d 100644
--- a/gmime/gmime-param.c
+++ b/gmime/gmime-param.c
@@ -648,14 +648,14 @@ g_mime_param_parse (GMimeParserOptions *options, const char *str)
 
 
 /**
- * g_mime_param_destroy:
- * @param: Mime param list to destroy
+ * g_mime_param_free:
+ * @param: a #GMimeParam
  *
  * Releases all memory used by this mime param back to the Operating
  * System.
  **/
 void
-g_mime_param_destroy (GMimeParam *param)
+g_mime_param_free (GMimeParam *param)
 {
        GMimeParam *next;
        
diff --git a/gmime/gmime-param.h b/gmime/gmime-param.h
index 129d1be..d35b592 100644
--- a/gmime/gmime-param.h
+++ b/gmime/gmime-param.h
@@ -46,7 +46,7 @@ struct _GMimeParam {
 
 GMimeParam *g_mime_param_new (const char *name, const char *value);
 GMimeParam *g_mime_param_parse (GMimeParserOptions *options, const char *str);
-void g_mime_param_destroy (GMimeParam *param);
+void g_mime_param_free (GMimeParam *param);
 
 const GMimeParam *g_mime_param_next (const GMimeParam *param);
 
diff --git a/tests/test-headers.c b/tests/test-headers.c
index 998fa82..7401a5e 100644
--- a/tests/test-headers.c
+++ b/tests/test-headers.c
@@ -106,7 +106,7 @@ test_indexing (void)
                testsuite_check_failed ("indexing past end of headers: %s", ex->message);
        } finally;
        
-       g_mime_header_list_destroy (list);
+       g_mime_header_list_free (list);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]