mirror of https://github.com/GNOME/gimp.git
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:
parent
3e4407a315
commit
5d5ad7ea73
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue