From 4065ec925cbcfc33bbe14f07b1039674b6ea503e Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 16 Nov 2013 12:57:05 +0000 Subject: [PATCH] add im_init_world() entry point C++ programs need this as a function rather than just a macro, see VImage.h thanks Phil for finding this --- ChangeLog | 3 +++ configure.ac | 6 +++--- libvips/deprecated/vips7compat.c | 11 +++++++++++ libvips/include/vips/vips7compat.h | 5 +++-- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 874f591d..56dd5aab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +15/11/13 started 7.36.4 +- improve compat with im_init_world() + 18/10/13 started 7.36.3 - fix compiler warnings in ubuntu 13.10 - reverse similarity rotation direction to match the convention used diff --git a/configure.ac b/configure.ac index faa981a4..581d70c3 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # also update the version number in the m4 macros below -AC_INIT([vips], [7.36.3], [vipsip@jiscmail.ac.uk]) +AC_INIT([vips], [7.36.4], [vipsip@jiscmail.ac.uk]) # required for gobject-introspection AC_PREREQ(2.62) @@ -17,7 +17,7 @@ AC_CONFIG_MACRO_DIR([m4]) # user-visible library versioning m4_define([vips_major_version], [7]) m4_define([vips_minor_version], [36]) -m4_define([vips_micro_version], [3]) +m4_define([vips_micro_version], [4]) m4_define([vips_version], [vips_major_version.vips_minor_version.vips_micro_version]) @@ -37,7 +37,7 @@ VIPS_VERSION_STRING=$VIPS_VERSION-`date` # binary interface changes not backwards compatible?: reset age to 0 LIBRARY_CURRENT=35 -LIBRARY_REVISION=3 +LIBRARY_REVISION=4 LIBRARY_AGE=0 # patched into include/vips/version.h diff --git a/libvips/deprecated/vips7compat.c b/libvips/deprecated/vips7compat.c index 046ae5ef..8e45a927 100644 --- a/libvips/deprecated/vips7compat.c +++ b/libvips/deprecated/vips7compat.c @@ -232,6 +232,17 @@ im_init( const char *filename ) return( image ); } +/* We can't do this with a rename macro since the C++ interface needs + * this entrypoint, see VImage.h. + * + * As a result our fancy ABI check will not work with the vips7 interface. + */ +int +im_init_world( const char *argv0 ) +{ + return( vips_init( argv0 ) ); +} + /* Prettyprint various header fields. Just for vips7 compat, use * vips_enum_value() instead. */ diff --git a/libvips/include/vips/vips7compat.h b/libvips/include/vips/vips7compat.h index 32c3d88d..4cf59b52 100644 --- a/libvips/include/vips/vips7compat.h +++ b/libvips/include/vips/vips7compat.h @@ -32,7 +32,7 @@ */ #ifndef VIPS_VIPS7COMPAT_H -#define VIPS_VIP7COMPATS_H +#define VIPS_VIPS7COMPAT_H #ifdef __cplusplus extern "C" { @@ -203,7 +203,6 @@ extern "C" { #define im_get_argv0 vips_get_argv0 #define im_version_string vips_version_string #define im_version vips_version -#define im_init_world vips_init #define im_get_option_group vips_get_option_group #define im_guess_prefix vips_guess_prefix #define im_guess_libdir vips_guess_libdir @@ -256,6 +255,8 @@ extern "C" { /* Compat functions. */ +int im_init_world( const char *argv0 ); + VipsImage *im_open( const char *filename, const char *mode ); VipsImage *im_open_local( VipsImage *parent,