don't use G_VALUE_COLLECT_INIT

This commit is contained in:
John Cupitt 2011-08-15 13:59:47 +01:00
parent f000d93042
commit 1e21963f83
3 changed files with 18 additions and 6 deletions

View File

@ -1,3 +1,7 @@
10/8/11 started 7.26.3
- don't use G_VALUE_COLLECT_INIT(), many platforms do not have a glib this
recent
10/8/11 started 7.26.2
- oops, im_benchmark.c had some stuff turned off
- configure option --without-cfitsio was broken (thanks Mike)

View File

@ -6,7 +6,7 @@ AC_CONFIG_MACRO_DIR(m4)
# user-visible library versioning
m4_define([vips_major_version], [7])
m4_define([vips_minor_version], [26])
m4_define([vips_micro_version], [2])
m4_define([vips_micro_version], [3])
m4_define([vips_version],
[vips_major_version.vips_minor_version.vips_micro_version])
@ -29,7 +29,7 @@ PACKAGE=vips
# interface changes not backwards compatible?: reset age to 0
LIBRARY_CURRENT=30
LIBRARY_REVISION=1
LIBRARY_REVISION=2
LIBRARY_AGE=15
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)

View File

@ -244,8 +244,12 @@ vips_operation_set_valist_required( VipsOperation *operation, va_list ap )
GValue value = { 0 };
char *msg = NULL;
G_VALUE_COLLECT_INIT( &value,
G_PARAM_SPEC_VALUE_TYPE( pspec ), ap, 0, &msg );
/* It'd be nice to use G_VALUE_COLLECT_INIT(), but
* that's only available in very recent glib.
*/
g_value_init( &value,
G_PARAM_SPEC_VALUE_TYPE( pspec ) );
G_VALUE_COLLECT( &value, ap, 0, &msg );
if( msg ) {
VipsObjectClass *class =
@ -321,9 +325,13 @@ vips_operation_get_valist( VipsOperation *operation, va_list ap )
/* Collect the arg from valist to eat it up, but don't
* do anything with it.
*
* It'd be nice to use G_VALUE_COLLECT_INIT(), but
* that's only available in very recent glib.
*/
G_VALUE_COLLECT_INIT( &value,
G_PARAM_SPEC_VALUE_TYPE( pspec ), ap, 0, &msg );
g_value_init( &value,
G_PARAM_SPEC_VALUE_TYPE( pspec ) );
G_VALUE_COLLECT( &value, ap, 0, &msg );
g_value_unset( &value );
}
else if( (argument_class->flags & VIPS_ARGUMENT_REQUIRED) &&