add const to vipsblob
This commit is contained in:
parent
eca5ed12de
commit
22e075d05a
@ -148,8 +148,9 @@ typedef struct _VipsBlob {
|
|||||||
VipsArea area;
|
VipsArea area;
|
||||||
} VipsBlob;
|
} VipsBlob;
|
||||||
|
|
||||||
VipsBlob *vips_blob_new( VipsCallbackFn free_fn, void *data, size_t size );
|
VipsBlob *vips_blob_new( VipsCallbackFn free_fn,
|
||||||
void *vips_blob_get( VipsBlob *blob, size_t *size );
|
const void *data, size_t size );
|
||||||
|
const void *vips_blob_get( VipsBlob *blob, size_t *size );
|
||||||
GType vips_blob_get_type( void );
|
GType vips_blob_get_type( void );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -529,11 +529,11 @@ vips_ref_string_get_type( void )
|
|||||||
* Returns: (transfer full): the new #VipsBlob.
|
* Returns: (transfer full): the new #VipsBlob.
|
||||||
*/
|
*/
|
||||||
VipsBlob *
|
VipsBlob *
|
||||||
vips_blob_new( VipsCallbackFn free_fn, void *data, size_t size )
|
vips_blob_new( VipsCallbackFn free_fn, const void *data, size_t size )
|
||||||
{
|
{
|
||||||
VipsArea *area;
|
VipsArea *area;
|
||||||
|
|
||||||
area = vips_area_new( free_fn, data );
|
area = vips_area_new( free_fn, (void *) data );
|
||||||
area->length = size;
|
area->length = size;
|
||||||
|
|
||||||
return( (VipsBlob *) area );
|
return( (VipsBlob *) area );
|
||||||
@ -550,7 +550,7 @@ vips_blob_new( VipsCallbackFn free_fn, void *data, size_t size )
|
|||||||
*
|
*
|
||||||
* Returns: (array length=size) (element-type guint8) (transfer none): the data
|
* Returns: (array length=size) (element-type guint8) (transfer none): the data
|
||||||
*/
|
*/
|
||||||
void *
|
const void *
|
||||||
vips_blob_get( VipsBlob *blob, size_t *size )
|
vips_blob_get( VipsBlob *blob, size_t *size )
|
||||||
{
|
{
|
||||||
return( vips_area_get_data( VIPS_AREA( blob ),
|
return( vips_area_get_data( VIPS_AREA( blob ),
|
||||||
|
@ -83,8 +83,8 @@ class Argument:
|
|||||||
# turn VipsBlobs into strings
|
# turn VipsBlobs into strings
|
||||||
# FIXME ... this will involve a copy, we should use
|
# FIXME ... this will involve a copy, we should use
|
||||||
# buffer() instead
|
# buffer() instead
|
||||||
if isinstance(value, Vips.Blob):
|
# if isinstance(value, Vips.Blob):
|
||||||
value = value.get()
|
# value = value.get()
|
||||||
|
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user