diff --git a/ChangeLog b/ChangeLog index 9e348d48..bbbc4bdf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ - add "nocache" operation flag, set for sequential load (thanks Diuming) - fix a crash in the tiff reader for huge values of RowsPerStrip (thanks Nicolas) +- remove use of G_DEFINE_BOXED_TYPE() to help compat (thanks Jake) 19/4/12 started 7.28.5 - ifthenelse blend mode was broken diff --git a/libvips/iofuncs/type.c b/libvips/iofuncs/type.c index b86cee5c..d3f8de3e 100644 --- a/libvips/iofuncs/type.c +++ b/libvips/iofuncs/type.c @@ -101,10 +101,29 @@ vips_thing_get_i( VipsThing *thing ) return( thing->i ); } +/* + * glib-2.26+ only + G_DEFINE_BOXED_TYPE( VipsThing, vips_thing, (GBoxedCopyFunc) vips_thing_copy, (GBoxedFreeFunc) vips_thing_free ); + */ + +GType +vips_thing_get_type( void ) +{ + static GType type = 0; + + if( !type ) { + type = g_boxed_type_register_static( "VipsThing", + (GBoxedCopyFunc) vips_thing_copy, + (GBoxedFreeFunc) vips_thing_free ); + } + + return( type ); +} + /** * SECTION: VipsArea * @short_description: an area of memory