Exemplo n.º 1
0
static void *
vips_cache_print_fn( void *value, void *a, void *b )
{
	char str[32768];
	VipsBuf buf = VIPS_BUF_STATIC( str );

	vips_object_to_string( VIPS_OBJECT( value ), &buf );

	printf( "%p - %s\n", value, vips_buf_all( &buf ) );

	return( NULL );
}
Exemplo n.º 2
0
static void *
vips_cache_print_fn( void *value, void *a, void *b )
{
	VipsOperationCacheEntry *entry = value;

	char str[32768];
	VipsBuf buf = VIPS_BUF_STATIC( str );

	vips_object_to_string( VIPS_OBJECT( entry->operation ), &buf );

	printf( "%p - %s\n", value, vips_buf_all( &buf ) );

	return( NULL );
}
Exemplo n.º 3
0
/* Make a VipsObject.
 */
void
vo_object_new( Reduce *rc, const char *name, 
	PElement *required, PElement *optional, PElement *out )
{
	Vo *vo;
	Managedgobject *managedgobject;

	if( !(vo = vo_new( rc, name )) ) 
		reduce_throw( rc );

	if( !vo_args( vo, required, optional ) ) {
		vo_free( vo );
		reduce_throw( rc );
	}

	/* Ask the object to construct.
	 */
	if( vips_object_build( vo->object ) ) {
		error_top( _( "VIPS library error." ) );
		error_sub( "%s", im_error_buffer() );
		im_error_clear();
		vo_free( vo );
		reduce_throw( rc );
	}

	/* Return the constructed object.
	 */
	if( !(managedgobject = managedgobject_new( vo->rc->heap, 
		G_OBJECT( vo->object ) )) ) {
		vo_free( vo );
		reduce_throw( rc );
	}

	PEPUTP( out, ELEMENT_MANAGED, managedgobject );

#ifdef DEBUG
{
	char txt[1000];
	VipsBuf buf = VIPS_BUF_STATIC( txt );

	vips_object_to_string( vo->object, &buf );
	printf( "vo_object_new: built %s\n", vips_buf_all( &buf ) );
}
#endif /*DEBUG*/

	vo_free( vo );
}