Introspection improvements (#3079)

* vala: Enhance the metadata to contain more symbols

* Enhance the introspection coverage

Always set data with destroy function as transfer full.
This commit is contained in:
Corentin Noël 2022-10-06 18:28:33 +02:00 committed by GitHub
parent df9f5d38f8
commit 5fcca56fe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 24 deletions

View File

@ -6,22 +6,32 @@ ClassMapFn.cls type="GLib.ObjectClass"
ArgumentClassMapFn.object_class type="GLib.ObjectClass" ArgumentClassMapFn.object_class type="GLib.ObjectClass"
ArgumentTable type="GLib.HashTable<GLib.ParamSpec,Vips.Argument?>" ArgumentTable type="GLib.HashTable<GLib.ParamSpec,Vips.Argument?>"
Image.eval#virtual_method skip ArrayDouble.newv skip=false
Image.invalidate#virtual_method skip ArrayImage.newv skip=false
Image.minimise#virtual_method skip ArrayInt.newv skip=false
Image.posteval#virtual_method skip
Image.preeval#virtual_method skip
Image.written#virtual_method skip
Image.memory skip
Image.matrix_from_array skip
Object.close#virtual_method skip Image.*#method skip=false
Object.postbuild#virtual_method skip Image.eval#virtual_method name="eval_impl"
Object.postclose#virtual_method skip Image.invalidate#virtual_method name="invalidate_impl"
Object.preclose#virtual_method skip Image.minimise#virtual_method name="minimise_impl"
Image.posteval#virtual_method name="posteval_impl"
Image.preeval#virtual_method name="preeval_impl"
Image.written#virtual_method name="written_impl"
Image.written#virtual_method.result out
Image.set_area.free_fn closure=-1 destroy=-1
Object.close#virtual_method name="close_impl"
Object.postbuild#virtual_method name="postbuild_impl"
Object.postclose#virtual_method name="postclose_impl"
Object.preclose#virtual_method name="preclose_impl"
Object.preclose#method name="do_preclose" Object.preclose#method name="do_preclose"
Object.sanity#virtual_method name="sanity_impl"
_object_set_member name="set_member" parent="Vips.Object" symbol_type="method" instance_idx=0 _object_set_member name="set_member" parent="Vips.Object" symbol_type="method" instance_idx=0
value_set_blob.free_fn closure=-1 destroy=-1
value_set_area.free_fn closure=-1 destroy=-1
Area.new.free_fn closure=-1 destroy=-1
cache_* skip=false name="cache_(.+)" parent="Vips.Cache" cache_* skip=false name="cache_(.+)" parent="Vips.Cache"
col_* skip=false name="col_(.+)" parent="Vips.ColorUtils" col_* skip=false name="col_(.+)" parent="Vips.ColorUtils"
tracked_* skip=false name="tracked_(.+)" parent="Vips.Tracked" tracked_* skip=false name="tracked_(.+)" parent="Vips.Tracked"

View File

@ -1545,8 +1545,8 @@ vips_image_get_fields( VipsImage *image )
* vips_image_set_area: * vips_image_set_area:
* @image: image to attach the metadata to * @image: image to attach the metadata to
* @name: metadata name * @name: metadata name
* @free_fn: (scope async): free function for @data * @free_fn: (scope async) (nullable): free function for @data
* @data: pointer to area of memory * @data: (transfer full): pointer to area of memory
* *
* Attaches @data as a metadata item on @image under the name @name. When * Attaches @data as a metadata item on @image under the name @name. When
* VIPS no longer needs the metadata, it will be freed with @free_fn. * VIPS no longer needs the metadata, it will be freed with @free_fn.
@ -1622,8 +1622,9 @@ vips_image_get_area( const VipsImage *image,
* vips_image_set_blob: * vips_image_set_blob:
* @image: image to attach the metadata to * @image: image to attach the metadata to
* @name: metadata name * @name: metadata name
* @free_fn: (scope async): free function for @data * @free_fn: (scope async) (nullable): free function for @data
* @data: (array length=length) (element-type guint8): pointer to area of memory * @data: (array length=length) (element-type guint8) (transfer full): pointer to area of
* memory
* @length: length of memory area * @length: length of memory area
* *
* Attaches @blob as a metadata item on @image under the name @name. A * Attaches @blob as a metadata item on @image under the name @name. A

View File

@ -238,8 +238,8 @@ vips_area_unref( VipsArea *area )
/** /**
* vips_area_new: * vips_area_new:
* @free_fn: (scope async): @data will be freed with this function * @free_fn: (scope async) (nullable): @data will be freed with this function
* @data: data will be freed with this function * @data: (transfer full): data will be freed with this function
* *
* A VipsArea wraps a chunk of memory. It adds reference counting and a free * A VipsArea wraps a chunk of memory. It adds reference counting and a free
* function. It also keeps a count and a %GType, so the area can be an array. * function. It also keeps a count and a %GType, so the area can be an array.
@ -1511,8 +1511,8 @@ vips_array_image_get_type( void )
/** /**
* vips_value_set_area: * vips_value_set_area:
* @value: set this value * @value: set this value
* @free_fn: (scope async): data will be freed with this function * @free_fn: (scope async) (nullable): data will be freed with this function
* @data: set @value to track this pointer * @data: (transfer full): set @value to track this pointer
* *
* Set value to be a ref-counted area of memory with a free function. * Set value to be a ref-counted area of memory with a free function.
*/ */
@ -1646,8 +1646,9 @@ vips_value_set_ref_string( GValue *value, const char *str )
/** /**
* vips_value_set_blob: * vips_value_set_blob:
* @value: (out): GValue to set * @value: (out): GValue to set
* @free_fn: (scope async): free function for @data * @free_fn: (scope async) (nullable): free function for @data
* @data: pointer to area of memory * @data: (array length=length) (element-type guint8) (transfer full): pointer to area of
* memory
* @length: length of memory area * @length: length of memory area
* *
* Sets @value to hold a @data. When @value is freed, @data will be * Sets @value to hold a @data. When @value is freed, @data will be
@ -1676,7 +1677,8 @@ vips_value_set_blob( GValue *value,
/** /**
* vips_value_set_blob_free: * vips_value_set_blob_free:
* @value: GValue to set * @value: GValue to set
* @data: pointer to area of memory * @data: (transfer full) (array length=length) (element-type guint8) : pointer to area of
* memory
* @length: length of memory area * @length: length of memory area
* *
* Just like vips_value_set_blob(), but when * Just like vips_value_set_blob(), but when
@ -1712,7 +1714,8 @@ vips_value_set_blob_free( GValue *value, void *data, size_t length )
* *
* See also: vips_value_set_blob() * See also: vips_value_set_blob()
* *
* Returns: (transfer none): The pointer held by @value. * Returns: (transfer none) (array length=length) (element-type guint8): The pointer held
* by @value.
*/ */
void * void *
vips_value_get_blob( const GValue *value, size_t *length ) vips_value_get_blob( const GValue *value, size_t *length )