[gimp] libgimpbase: finally get rid of gimp_parasite_data() and…



commit 5d5ad7ea7363976ac4dcd49b30e5465c67379412
Author: Jehan <jehan girinstud io>
Date:   Sat Jan 30 09:06:09 2021 +0100

    libgimpbase: finally get rid of gimp_parasite_data() and…
    
    … gimp_parasite_data_size().
    
    gimp_parasite_data() was non introspection friendly because calling code
    needs to know the size of returned data a way or another (the concept of
    data pointer with random contents, no known size and no way to know the
    end of the buffer is not usable in many languages other than C).
    
    Now that all usage have been replaced by gimp_parasite_get_data(), we
    can just remove the functions from the v3 API.

 libgimpbase/gimpparasite.c | 35 -----------------------------------
 libgimpbase/gimpparasite.h |  2 --
 2 files changed, 37 deletions(-)
---
diff --git a/libgimpbase/gimpparasite.c b/libgimpbase/gimpparasite.c
index 11bd13895b..af823346fe 100644
--- a/libgimpbase/gimpparasite.c
+++ b/libgimpbase/gimpparasite.c
@@ -409,41 +409,6 @@ gimp_parasite_name (const GimpParasite *parasite)
   return NULL;
 }
 
-/**
- * gimp_parasite_data:
- * @parasite: a #GimpParasite
- *
- * Gets the parasite's data. It may not necessarily be text, nor is it
- * guaranteed to be %NULL-terminated. It is your responsibility to also
- * call gimp_parasite_data_size() and to know how to deal with this
- * data.
- *
- * Returns: @parasite's data.
- */
-gconstpointer
-gimp_parasite_data (const GimpParasite *parasite)
-{
-  if (parasite)
-    return parasite->data;
-
-  return NULL;
-}
-
-/**
- * gimp_parasite_data_size:
- * @parasite: a #GimpParasite
- *
- * Returns: @parasite's data size.
- */
-glong
-gimp_parasite_data_size (const GimpParasite *parasite)
-{
-  if (parasite)
-    return parasite->size;
-
-  return 0;
-}
-
 /**
  * gimp_parasite_get_data:
  * @parasite: a #GimpParasite
diff --git a/libgimpbase/gimpparasite.h b/libgimpbase/gimpparasite.h
index 617c726131..0d9fdc7b71 100644
--- a/libgimpbase/gimpparasite.h
+++ b/libgimpbase/gimpparasite.h
@@ -106,8 +106,6 @@ gboolean       gimp_parasite_has_flag      (const GimpParasite *parasite,
                                             gulong              flag);
 gulong         gimp_parasite_flags         (const GimpParasite *parasite);
 const gchar  * gimp_parasite_name          (const GimpParasite *parasite);
-gconstpointer  gimp_parasite_data          (const GimpParasite *parasite);
-glong          gimp_parasite_data_size     (const GimpParasite *parasite);
 
 gconstpointer  gimp_parasite_get_data      (const GimpParasite *parasite,
                                             guint32            *num_bytes);


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