fix matrix and csv source load

see https://github.com/libvips/libvips/issues/1541#issuecomment-649766008
This commit is contained in:
John Cupitt 2020-06-25 23:03:03 +01:00
parent 4bf27acccb
commit 3428767a46
4 changed files with 12 additions and 12 deletions

View File

@ -320,8 +320,8 @@ vips_foreign_load_csv_read_double( VipsForeignLoadCsv *csv, double *out )
static int
vips_foreign_load_csv_header( VipsForeignLoad *load )
{
VipsForeignLoadCsv *csv = (VipsForeignLoadCsv *) load;
VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( load );
VipsForeignLoadCsv *csv = (VipsForeignLoadCsv *) load;
int i;
double value;
@ -381,8 +381,8 @@ vips_foreign_load_csv_header( VipsForeignLoad *load )
static int
vips_foreign_load_csv_load( VipsForeignLoad *load )
{
VipsForeignLoadCsv *csv = (VipsForeignLoadCsv *) load;
VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( load );
VipsForeignLoadCsv *csv = (VipsForeignLoadCsv *) load;
int i;
int x, y;
@ -533,8 +533,8 @@ vips_foreign_load_csv_file_get_flags_filename( const char *filename )
static int
vips_foreign_load_csv_file_build( VipsObject *object )
{
VipsForeignLoadCsvFile *file = (VipsForeignLoadCsvFile *) object;
VipsForeignLoadCsv *csv = (VipsForeignLoadCsv *) object;
VipsForeignLoadCsvFile *file = (VipsForeignLoadCsvFile *) object;
if( file->filename )
if( !(csv->source =
@ -601,10 +601,10 @@ G_DEFINE_TYPE( VipsForeignLoadCsvSource, vips_foreign_load_csv_source,
static int
vips_foreign_load_csv_source_build( VipsObject *object )
{
VipsForeignLoadCsvSource *source = (VipsForeignLoadCsvSource *) object;
VipsForeignLoadCsv *csv = (VipsForeignLoadCsv *) object;
VipsForeignLoadCsvSource *source = (VipsForeignLoadCsvSource *) object;
if( csv->source ) {
if( source->source ) {
csv->source = source->source;
g_object_ref( csv->source );
}

View File

@ -1346,8 +1346,8 @@ G_DEFINE_TYPE( VipsForeignLoadGifFile, vips_foreign_load_gif_file,
static int
vips_foreign_load_gif_file_build( VipsObject *object )
{
VipsForeignLoadGifFile *file = (VipsForeignLoadGifFile *) object;
VipsForeignLoadGif *gif = (VipsForeignLoadGif *) object;
VipsForeignLoadGifFile *file = (VipsForeignLoadGifFile *) object;
if( file->filename )
if( !(gif->source =

View File

@ -958,8 +958,8 @@ G_DEFINE_TYPE( VipsForeignLoadHeifFile, vips_foreign_load_heif_file,
static int
vips_foreign_load_heif_file_build( VipsObject *object )
{
VipsForeignLoadHeifFile *file = (VipsForeignLoadHeifFile *) object;
VipsForeignLoadHeif *heif = (VipsForeignLoadHeif *) object;
VipsForeignLoadHeifFile *file = (VipsForeignLoadHeifFile *) object;
if( file->filename )
if( !(heif->source =
@ -1040,9 +1040,9 @@ G_DEFINE_TYPE( VipsForeignLoadHeifBuffer, vips_foreign_load_heif_buffer,
static int
vips_foreign_load_heif_buffer_build( VipsObject *object )
{
VipsForeignLoadHeif *heif = (VipsForeignLoadHeif *) object;
VipsForeignLoadHeifBuffer *buffer =
(VipsForeignLoadHeifBuffer *) object;
VipsForeignLoadHeif *heif = (VipsForeignLoadHeif *) object;
if( buffer->buf )
if( !(heif->source = vips_source_new_from_memory(
@ -1110,9 +1110,9 @@ G_DEFINE_TYPE( VipsForeignLoadHeifSource, vips_foreign_load_heif_source,
static int
vips_foreign_load_heif_source_build( VipsObject *object )
{
VipsForeignLoadHeif *heif = (VipsForeignLoadHeif *) object;
VipsForeignLoadHeifSource *source =
(VipsForeignLoadHeifSource *) object;
VipsForeignLoadHeif *heif = (VipsForeignLoadHeif *) object;
if( source->source ) {
heif->source = source->source;

View File

@ -305,8 +305,8 @@ vips_foreign_load_matrix_file_get_flags_filename( const char *filename )
static int
vips_foreign_load_matrix_file_build( VipsObject *object )
{
VipsForeignLoadMatrixFile *file = (VipsForeignLoadMatrixFile *) object;
VipsForeignLoadMatrix *matrix = (VipsForeignLoadMatrix *) object;
VipsForeignLoadMatrixFile *file = (VipsForeignLoadMatrixFile *) object;
if( file->filename )
if( !(matrix->source =
@ -398,11 +398,11 @@ G_DEFINE_TYPE( VipsForeignLoadMatrixSource, vips_foreign_load_matrix_source,
static int
vips_foreign_load_matrix_source_build( VipsObject *object )
{
VipsForeignLoadMatrix *matrix = (VipsForeignLoadMatrix *) object;
VipsForeignLoadMatrixSource *source =
(VipsForeignLoadMatrixSource *) object;
VipsForeignLoadMatrix *matrix = (VipsForeignLoadMatrix *) object;
if( matrix->source ) {
if( source->source ) {
matrix->source = source->source;
g_object_ref( matrix->source );
}