Ejemplo n.º 1
0
/* Return the first item.
 */
static VipsOperation *
vips_cache_get_first( void )
{
	if( vips_cache_table )
		return( VIPS_OPERATION( vips_hash_table_map( vips_cache_table, 
			vips_cache_get_first_fn, NULL, NULL ) ) );
	else
		return( NULL ); 
}
Ejemplo n.º 2
0
/* Return the first item.
 */
static VipsOperation *
vips_cache_get_first( void )
{
	VipsOperationCacheEntry *entry;

	if( vips_cache_table &&
		(entry = vips_hash_table_map( vips_cache_table, 
			vips_cache_get_first_fn, NULL, NULL )) )
		return( VIPS_OPERATION( entry->operation ) );

	return( NULL ); 
}
Ejemplo n.º 3
0
/**
 * vips_cache_print:
 *
 * Print the whole operation cache to stdout. Handy for debugging.
 */
void
vips_cache_print( void )
{
	g_mutex_lock( vips_cache_lock );

	if( vips_cache_table ) {
		printf( "Operation cache:\n" );
		vips_hash_table_map( vips_cache_table, 
			vips_cache_print_fn, NULL, NULL ); 
	}

	g_mutex_unlock( vips_cache_lock );
}