Merge remote-tracking branch 'origin/7.28' into 7.28
Conflicts: ChangeLog libvips/iofuncs/cache.c
This commit is contained in:
commit
9b1ff0c399
@ -1,5 +1,5 @@
|
|||||||
18/6/12 started 7.28.8
|
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
|
18/6/12 started 7.28.7
|
||||||
- add vips_flatten() -- flatten RGBA to RGB
|
- add vips_flatten() -- flatten RGBA to RGB
|
||||||
|
10
TODO
10
TODO
@ -1,13 +1,3 @@
|
|||||||
- try
|
|
||||||
|
|
||||||
$ vipsthumbnail wtc.tif --vips-leak
|
|
||||||
160 objects alive:
|
|
||||||
0) VipsRegion (0x7f5ef804fd10)
|
|
||||||
....
|
|
||||||
|
|
||||||
argh
|
|
||||||
|
|
||||||
|
|
||||||
blocking bugs
|
blocking bugs
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* cache vips operations
|
/* cache vips operations
|
||||||
*
|
*
|
||||||
* 20/6/12
|
* 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().
|
* g_int64_hash() and g_double_hash().
|
||||||
*/
|
*/
|
||||||
#define INT64_HASH(X) (((unsigned int *) (X))[0] ^ ((unsigned int *) (X))[1])
|
#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
|
/* 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
|
* held in a GParamSpec allowing OBJECT, but the value could be of type
|
||||||
@ -426,7 +426,7 @@ vips_cache_init( void )
|
|||||||
}
|
}
|
||||||
|
|
||||||
static 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];
|
char str[32768];
|
||||||
VipsBuf buf = VIPS_BUF_STATIC( str );
|
VipsBuf buf = VIPS_BUF_STATIC( str );
|
||||||
@ -498,17 +498,19 @@ vips_cache_drop( VipsOperation *operation )
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
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( value );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Return the first item.
|
||||||
|
*/
|
||||||
static VipsOperation *
|
static VipsOperation *
|
||||||
vips_cache_find_first( void )
|
vips_cache_first( void )
|
||||||
{
|
{
|
||||||
if( vips_cache_table )
|
if( vips_cache_table )
|
||||||
return( VIPS_OPERATION( vips_hash_table_map( vips_cache_table,
|
return( VIPS_OPERATION( vips_hash_table_map( vips_cache_table,
|
||||||
vips_cache_find_first_fn, NULL, NULL ) ) );
|
vips_cache_first_fn, NULL, NULL ) ) );
|
||||||
else
|
else
|
||||||
return( NULL );
|
return( NULL );
|
||||||
}
|
}
|
||||||
@ -531,8 +533,8 @@ vips_cache_drop_all( void )
|
|||||||
* g_hash_table_foreach() and friends. Repeatedly drop the
|
* g_hash_table_foreach() and friends. Repeatedly drop the
|
||||||
* first item instead.
|
* first item instead.
|
||||||
*/
|
*/
|
||||||
while( (operation = vips_cache_find_first()) )
|
while( (operation = vips_cache_first()) )
|
||||||
vips_cache_drop( operation );
|
vips_cache_drop( operation );
|
||||||
|
|
||||||
VIPS_FREEF( g_hash_table_unref, vips_cache_table );
|
VIPS_FREEF( g_hash_table_unref, vips_cache_table );
|
||||||
}
|
}
|
||||||
|
@ -249,7 +249,7 @@ typedef struct {
|
|||||||
static gboolean
|
static gboolean
|
||||||
vips_hash_table_predicate( const char *key, void *value, Pair *pair )
|
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.
|
/* Like slist map, but for a hash table.
|
||||||
|
@ -9,7 +9,7 @@ msgstr ""
|
|||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
|
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
|
||||||
"product=glib&keywords=I18N+L10N&component=general\n"
|
"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"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user