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.
This commit is contained in:
Jehan 2021-01-30 09:06:09 +01:00
parent 3e4407a315
commit 5d5ad7ea73
2 changed files with 0 additions and 37 deletions

View File

@ -409,41 +409,6 @@ gimp_parasite_name (const GimpParasite *parasite)
return NULL; 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: * gimp_parasite_get_data:
* @parasite: a #GimpParasite * @parasite: a #GimpParasite

View File

@ -106,8 +106,6 @@ gboolean gimp_parasite_has_flag (const GimpParasite *parasite,
gulong flag); gulong flag);
gulong gimp_parasite_flags (const GimpParasite *parasite); gulong gimp_parasite_flags (const GimpParasite *parasite);
const gchar * gimp_parasite_name (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, gconstpointer gimp_parasite_get_data (const GimpParasite *parasite,
guint32 *num_bytes); guint32 *num_bytes);