add a "const" to get_string

This commit is contained in:
John Cupitt 2013-07-13 13:02:06 +01:00
parent da47510e37
commit 101c60cf42
7 changed files with 9 additions and 10 deletions

View File

@ -1056,7 +1056,7 @@ write_new( VipsImage *in, const char *filename )
static int
vips2rad_put_header( Write *write )
{
char *str;
const char *str;
int i, j;
double d;

View File

@ -88,7 +88,7 @@ vips_foreign_save_tiff_build( VipsObject *object )
VipsForeignSave *save = (VipsForeignSave *) object;
VipsForeignSaveTiff *tiff = (VipsForeignSaveTiff *) object;
char *p;
const char *p;
if( VIPS_OBJECT_CLASS( vips_foreign_save_tiff_parent_class )->
build( object ) )

View File

@ -452,7 +452,7 @@ static int
set_exif_resolution( ExifData *ed, VipsImage *im )
{
double xres, yres;
char *p;
const char *p;
int unit;
VIPS_DEBUG_MSG( "set_exif_resolution: vips res of %g, %g\n",
@ -578,7 +578,7 @@ static void
vips_exif_update_entry( ExifEntry *entry, VipsExif *ve )
{
char name[256];
char *value;
const char *value;
vips_snprintf( name, 256, "exif-ifd%d-%s",
exif_entry_get_ifd( entry ),

View File

@ -149,7 +149,7 @@ int vips_image_get_double( const VipsImage *image,
const char *field, double *out );
void vips_image_set_double( VipsImage *image, const char *field, double d );
int vips_image_get_string( const VipsImage *image,
const char *field, char **out );
const char *field, const char **out );
void vips_image_set_string( VipsImage *image,
const char *field, const char *str );

View File

@ -1357,7 +1357,8 @@ vips_image_set_double( VipsImage *image, const char *field, double d )
* Returns: 0 on success, -1 otherwise.
*/
int
vips_image_get_string( const VipsImage *image, const char *field, char **out )
vips_image_get_string( const VipsImage *image, const char *field,
const char **out )
{
int i;
GValue value_copy = { 0 };

View File

@ -418,7 +418,7 @@ static void
vips_image_summary( VipsObject *object, VipsBuf *buf )
{
VipsImage *image = VIPS_IMAGE( object );
char *p;
const char *p;
vips_buf_appendf( buf, "%dx%d",
vips_image_get_width( image ), vips_image_get_height( image ) );

View File

@ -148,9 +148,7 @@ calculate_shrink( int width, int height, double *residual )
static int
thumbnail_find_jpegshrink( VipsImage *im )
{
int shrink;
shrink = calculate_shrink( im->Xsize, im->Ysize, NULL );
int shrink = calculate_shrink( im->Xsize, im->Ysize, NULL );
if( shrink >= 8 )
return( 8 );