diff --git a/ChangeLog b/ChangeLog index f5c43908..22a943fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,5 @@ 18/6/12 started 7.28.8 -- try to make it buildable with glib-2.12 +- fixes for centos5 portability 18/6/12 started 7.28.7 - add vips_flatten() -- flatten RGBA to RGB diff --git a/TODO b/TODO index 9ff912c8..e4e24aca 100644 --- a/TODO +++ b/TODO @@ -1,13 +1,3 @@ -- try - - $ vipsthumbnail wtc.tif --vips-leak - 160 objects alive: - 0) VipsRegion (0x7f5ef804fd10) - .... - - argh - - blocking bugs ============= diff --git a/libvips/iofuncs/cache.c b/libvips/iofuncs/cache.c index 28f00377..1c8b1f22 100644 --- a/libvips/iofuncs/cache.c +++ b/libvips/iofuncs/cache.c @@ -1,7 +1,7 @@ /* cache vips operations * * 20/6/12 - * - now works with glib-2.12 + * - try to make it compile on centos5 */ /* @@ -107,7 +107,7 @@ static int vips_cache_time = 0; * g_int64_hash() and g_double_hash(). */ #define INT64_HASH(X) (((unsigned int *) (X))[0] ^ ((unsigned int *) (X))[1]) -#define DOUBLE_HASH(X) (INT64_HASH(*((guint64 *) (X)))) +#define DOUBLE_HASH(X) (INT64_HASH(X)) /* Pass in the pspec so we can get the generic type. For example, a * held in a GParamSpec allowing OBJECT, but the value could be of type @@ -426,7 +426,7 @@ vips_cache_init( void ) } static void * -vips_cache_dump_fn( void *value, void *a, void *b) +vips_cache_dump_fn( void *value, void *a, void *b ) { char str[32768]; VipsBuf buf = VIPS_BUF_STATIC( str ); @@ -498,17 +498,19 @@ vips_cache_drop( VipsOperation *operation ) } static void * -vips_cache_find_first_fn( void *value, void *a, void *b ) +vips_cache_first_fn( void *value, void *a, void *b ) { return( value ); } +/* Return the first item. + */ static VipsOperation * -vips_cache_find_first( void ) +vips_cache_first( void ) { if( vips_cache_table ) - return( VIPS_OPERATION( vips_hash_table_map( vips_cache_table, - vips_cache_find_first_fn, NULL, NULL ) ) ); + return( VIPS_OPERATION( vips_hash_table_map( vips_cache_table, + vips_cache_first_fn, NULL, NULL ) ) ); else return( NULL ); } @@ -531,8 +533,8 @@ vips_cache_drop_all( void ) * g_hash_table_foreach() and friends. Repeatedly drop the * first item instead. */ - while( (operation = vips_cache_find_first()) ) - vips_cache_drop( operation ); + while( (operation = vips_cache_first()) ) + vips_cache_drop( operation ); VIPS_FREEF( g_hash_table_unref, vips_cache_table ); } diff --git a/libvips/iofuncs/util.c b/libvips/iofuncs/util.c index bf23160a..383e1716 100644 --- a/libvips/iofuncs/util.c +++ b/libvips/iofuncs/util.c @@ -249,7 +249,7 @@ typedef struct { static gboolean vips_hash_table_predicate( const char *key, void *value, Pair *pair ) { - return( (pair->result == pair->fn( value, pair->a, pair->b )) ); + return( (pair->result = pair->fn( value, pair->a, pair->b )) != NULL ); } /* Like slist map, but for a hash table. diff --git a/po/vips7.pot b/po/vips7.pot index fbde2839..e5d06de6 100644 --- a/po/vips7.pot +++ b/po/vips7.pot @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=glib&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2012-06-20 12:31+0100\n" +"POT-Creation-Date: 2012-06-20 22:20+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n"