fix up -DVIPS_DEBUG build
This commit is contained in:
parent
0c8ecc4577
commit
440b3a3362
|
@ -381,7 +381,7 @@ vips_exif_set_double( ExifData *ed,
|
|||
sizeof_component = entry->size / entry->components;
|
||||
offset = component * sizeof_component;
|
||||
|
||||
VIPS_DEBUG_MSG( "vips_exif_set_double: %s = \"%s\"\n",
|
||||
VIPS_DEBUG_MSG( "vips_exif_set_double: %s = %g\n",
|
||||
exif_tag_get_title( entry->tag ), value );
|
||||
|
||||
if( entry->format == EXIF_FORMAT_RATIONAL ) {
|
||||
|
@ -505,7 +505,7 @@ set_exif_resolution( ExifData *ed, VipsImage *im )
|
|||
static int
|
||||
set_exif_dimensions( ExifData *ed, VipsImage *im )
|
||||
{
|
||||
VIPS_DEBUG_MSG( "set_exif_dimensions: vips size of %g, %g\n",
|
||||
VIPS_DEBUG_MSG( "set_exif_dimensions: vips size of %d, %d\n",
|
||||
im->Xsize, im->Ysize );
|
||||
|
||||
if( write_tag( ed, 2, EXIF_TAG_PIXEL_X_DIMENSION,
|
||||
|
|
|
@ -460,9 +460,10 @@ extern const guint64 vips__image_sizeof_bandformat[];
|
|||
*/
|
||||
#ifdef VIPS_DEBUG
|
||||
#define VIPS_IMAGE_ADDR( I, X, Y ) \
|
||||
( ((X) >= 0 && (X) < (I)->Xsize && \
|
||||
(Y) >= 0 && (Y) < (I)->Ysize) ? \
|
||||
((I)->data + \
|
||||
( ((X) >= 0 && (X) < VIPS_IMAGE( I )->Xsize && \
|
||||
(Y) >= 0 && (Y) < VIPS_IMAGE( I )->Ysize && \
|
||||
VIPS_IMAGE( I )->data) ? \
|
||||
(VIPS_IMAGE( I )->data + \
|
||||
(Y) * VIPS_IMAGE_SIZEOF_LINE( I ) + \
|
||||
(X) * VIPS_IMAGE_SIZEOF_PEL( I )) : \
|
||||
(fprintf( stderr, \
|
||||
|
@ -474,8 +475,8 @@ extern const guint64 vips__image_sizeof_bandformat[];
|
|||
__FILE__, __LINE__, \
|
||||
(X), (Y), \
|
||||
0, 0, \
|
||||
(I)->Xsize, \
|
||||
(I)->Ysize ), abort(), (VipsPel *) NULL) \
|
||||
VIPS_IMAGE( I )->Xsize, \
|
||||
VIPS_IMAGE( I )->Ysize ), (VipsPel *) NULL) \
|
||||
)
|
||||
#else /*!VIPS_DEBUG*/
|
||||
#define VIPS_IMAGE_ADDR( I, X, Y ) \
|
||||
|
@ -486,10 +487,11 @@ extern const guint64 vips__image_sizeof_bandformat[];
|
|||
|
||||
#ifdef VIPS_DEBUG
|
||||
#define VIPS_MATRIX( I, X, Y ) \
|
||||
(((I)->BandFmt == VIPS_FORMAT_DOUBLE && (I)->Bands == 1) ? \
|
||||
((VIPS_IMAGE( I )->BandFmt == VIPS_FORMAT_DOUBLE && \
|
||||
VIPS_IMAGE( I )->Bands == 1) ? \
|
||||
((double *) VIPS_IMAGE_ADDR( I, X, Y )) : \
|
||||
(fprintf( stderr, "VIPS_MATRIX: not a matrix image\n" ), \
|
||||
(VipsPel *) NULL))
|
||||
(double *) NULL))
|
||||
#else /*!VIPS_DEBUG*/
|
||||
#define VIPS_MATRIX( I, X, Y ) \
|
||||
((double *) VIPS_IMAGE_ADDR( I, X, Y ))
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
extern "C" {
|
||||
#endif /*__cplusplus*/
|
||||
|
||||
#define VIPS_FREEF( F, S ) \
|
||||
G_STMT_START { \
|
||||
#define VIPS_FREEF( F, S ) G_STMT_START { \
|
||||
if( S ) { \
|
||||
(void) F( (S) ); \
|
||||
(S) = 0; \
|
||||
|
|
|
@ -37,7 +37,17 @@ extern "C" {
|
|||
|
||||
/* Handy!
|
||||
*/
|
||||
#ifdef VIPS_DEBUG
|
||||
#define VIPS_UNREF( X ) G_STMT_START { \
|
||||
if( X ) { \
|
||||
g_assert( G_OBJECT( X )->ref_count > 0 ); \
|
||||
g_object_unref( X ); \
|
||||
(X) = 0; \
|
||||
} \
|
||||
} G_STMT_END
|
||||
#else /*!VIPS_DEBUG*/
|
||||
#define VIPS_UNREF( X ) VIPS_FREEF( g_object_unref, (X) )
|
||||
#endif /*VIPS_DEBUG*/
|
||||
|
||||
typedef struct _VipsObject VipsObject;
|
||||
typedef struct _VipsObjectClass VipsObjectClass;
|
||||
|
|
|
@ -189,7 +189,7 @@ vips_region_finalize( GObject *gobject )
|
|||
{
|
||||
#ifdef VIPS_DEBUG
|
||||
VIPS_DEBUG_MSG( "vips_region_finalize: " );
|
||||
vips_object_print( VIPS_OBJECT( gobject ) );
|
||||
vips_object_print_name( VIPS_OBJECT( gobject ) );
|
||||
#endif /*VIPS_DEBUG*/
|
||||
|
||||
G_OBJECT_CLASS( vips_region_parent_class )->finalize( gobject );
|
||||
|
@ -264,7 +264,7 @@ vips_region_dispose( GObject *gobject )
|
|||
|
||||
#ifdef VIPS_DEBUG
|
||||
VIPS_DEBUG_MSG( "vips_region_dispose: " );
|
||||
vips_object_print( VIPS_OBJECT( gobject ) );
|
||||
vips_object_print_name( VIPS_OBJECT( gobject ) );
|
||||
#endif /*VIPS_DEBUG*/
|
||||
|
||||
vips_object_preclose( VIPS_OBJECT( gobject ) );
|
||||
|
|
|
@ -1624,7 +1624,7 @@ vips__parse_size( const char *size_string )
|
|||
}
|
||||
g_free( unit );
|
||||
|
||||
VIPS_DEBUG_MSG( "parse_size: parsed \"%s\" as %lld\n",
|
||||
VIPS_DEBUG_MSG( "parse_size: parsed \"%s\" as %" G_GUINT64_FORMAT "\n",
|
||||
size_string, size );
|
||||
|
||||
return( size );
|
||||
|
|
|
@ -128,7 +128,7 @@ static void
|
|||
vips_interpolate_finalize( GObject *gobject )
|
||||
{
|
||||
printf( "vips_interpolate_finalize: " );
|
||||
vips_object_print( VIPS_OBJECT( gobject ) );
|
||||
vips_object_print_name( VIPS_OBJECT( gobject ) );
|
||||
|
||||
G_OBJECT_CLASS( vips_interpolate_parent_class )->finalize( gobject );
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ vips_interpolate_init( VipsInterpolate *interpolate )
|
|||
{
|
||||
#ifdef DEBUG
|
||||
printf( "vips_interpolate_init: " );
|
||||
vips_object_print( VIPS_OBJECT( interpolate ) );
|
||||
vips_object_print_name( VIPS_OBJECT( interpolate ) );
|
||||
#endif /*DEBUG*/
|
||||
}
|
||||
|
||||
|
@ -365,7 +365,7 @@ vips_interpolate_nearest_init( VipsInterpolateNearest *nearest )
|
|||
{
|
||||
#ifdef DEBUG
|
||||
printf( "vips_interpolate_nearest_init: " );
|
||||
vips_object_print( VIPS_OBJECT( nearest ) );
|
||||
vips_object_print_name( VIPS_OBJECT( nearest ) );
|
||||
#endif /*DEBUG*/
|
||||
}
|
||||
|
||||
|
@ -536,7 +536,7 @@ vips_interpolate_bilinear_init( VipsInterpolateBilinear *bilinear )
|
|||
{
|
||||
#ifdef DEBUG
|
||||
printf( "vips_interpolate_bilinear_init: " );
|
||||
vips_object_print( VIPS_OBJECT( bilinear ) );
|
||||
vips_object_print_name( VIPS_OBJECT( bilinear ) );
|
||||
#endif /*DEBUG*/
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue