reorder Target struct to improve compat
so fields are at the same position at least see https://github.com/libvips/libvips/issues/2880
This commit is contained in:
parent
16e0182e52
commit
748a99d245
@ -412,11 +412,11 @@ struct _VipsTarget {
|
|||||||
*/
|
*/
|
||||||
gboolean ended;
|
gboolean ended;
|
||||||
|
|
||||||
/* Write memory output and track write point here. We use a GString
|
/* Write memory output here. We use a GString rather than a
|
||||||
* rather than a GByteArray since we need eg. g_string_overwrite_len().
|
* GByteArray since we need eg. g_string_overwrite_len().
|
||||||
|
* @position tracks the current write position in this.
|
||||||
*/
|
*/
|
||||||
GString *memory_buffer;
|
GString *memory_buffer;
|
||||||
off_t position;
|
|
||||||
|
|
||||||
/* And return memory via this blob.
|
/* And return memory via this blob.
|
||||||
*/
|
*/
|
||||||
@ -428,6 +428,10 @@ struct _VipsTarget {
|
|||||||
unsigned char output_buffer[VIPS_TARGET_BUFFER_SIZE];
|
unsigned char output_buffer[VIPS_TARGET_BUFFER_SIZE];
|
||||||
int write_point;
|
int write_point;
|
||||||
|
|
||||||
|
/* Write position in memory_buffer.
|
||||||
|
*/
|
||||||
|
off_t position;
|
||||||
|
|
||||||
/* Temp targets on the filesystem need deleting, sometimes.
|
/* Temp targets on the filesystem need deleting, sometimes.
|
||||||
*/
|
*/
|
||||||
gboolean delete_on_close;
|
gboolean delete_on_close;
|
||||||
@ -445,6 +449,10 @@ typedef struct _VipsTargetClass {
|
|||||||
*/
|
*/
|
||||||
gint64 (*write)( VipsTarget *, const void *, size_t );
|
gint64 (*write)( VipsTarget *, const void *, size_t );
|
||||||
|
|
||||||
|
/* Deprecated in favour of ::end.
|
||||||
|
*/
|
||||||
|
void (*finish)( VipsTarget * );
|
||||||
|
|
||||||
/* libtiff needs to be able to seek and read on targets,
|
/* libtiff needs to be able to seek and read on targets,
|
||||||
* unfortunately.
|
* unfortunately.
|
||||||
*
|
*
|
||||||
@ -468,10 +476,6 @@ typedef struct _VipsTargetClass {
|
|||||||
*/
|
*/
|
||||||
int (*end)( VipsTarget * );
|
int (*end)( VipsTarget * );
|
||||||
|
|
||||||
/* Deprecated in favour of ::end.
|
|
||||||
*/
|
|
||||||
void (*finish)( VipsTarget * );
|
|
||||||
|
|
||||||
} VipsTargetClass;
|
} VipsTargetClass;
|
||||||
|
|
||||||
VIPS_API
|
VIPS_API
|
||||||
@ -547,10 +551,10 @@ typedef struct _VipsTargetCustomClass {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
gint64 (*write)( VipsTargetCustom *, const void *, gint64 );
|
gint64 (*write)( VipsTargetCustom *, const void *, gint64 );
|
||||||
|
void (*finish)( VipsTargetCustom * );
|
||||||
gint64 (*read)( VipsTargetCustom *, void *, gint64 );
|
gint64 (*read)( VipsTargetCustom *, void *, gint64 );
|
||||||
gint64 (*seek)( VipsTargetCustom *, gint64, int );
|
gint64 (*seek)( VipsTargetCustom *, gint64, int );
|
||||||
int (*end)( VipsTargetCustom * );
|
int (*end)( VipsTargetCustom * );
|
||||||
void (*finish)( VipsTargetCustom * );
|
|
||||||
|
|
||||||
} VipsTargetCustomClass;
|
} VipsTargetCustomClass;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user