rename vips_init() as VIPS_INIT()
stops a deprecation warning from gtk-doc vips_init() is now a compat macro
This commit is contained in:
parent
cb2b217434
commit
1abcc1eae4
@ -246,7 +246,7 @@ im_open( const char *filename, const char *mode )
|
||||
* for old programs which are missing an vips_init() call. We need
|
||||
* i18n set up before we can translate.
|
||||
*/
|
||||
if( vips_init( "giant_banana" ) )
|
||||
if( vips__init( "giant_banana" ) )
|
||||
vips_error_clear();
|
||||
|
||||
/* We have to go via the old VipsFormat system so we can support the
|
||||
@ -427,7 +427,7 @@ im_init( const char *filename )
|
||||
int
|
||||
im_init_world( const char *argv0 )
|
||||
{
|
||||
return( vips_init( argv0 ) );
|
||||
return( vips__init( argv0 ) );
|
||||
}
|
||||
|
||||
/* Prettyprint various header fields. Just for vips7 compat, use
|
||||
|
@ -161,7 +161,7 @@ extern "C" {
|
||||
/* We can't use _ here since this will be compiled by our clients and they may
|
||||
* not have _().
|
||||
*/
|
||||
#define vips_init( ARGV0 ) \
|
||||
#define VIPS_INIT( ARGV0 ) \
|
||||
(sizeof( VipsObject ) != vips__get_sizeof_vipsobject() ? ( \
|
||||
vips_info( "vips_init", "ABI mismatch" ), \
|
||||
vips_info( "vips_init", \
|
||||
|
@ -266,6 +266,10 @@ vips_image_new_mode( const char *filename, const char *mode );
|
||||
|
||||
int im_init_world( const char *argv0 );
|
||||
|
||||
/* We used to have this in lowercase.
|
||||
*/
|
||||
#define vips_init(X) VIPS_INIT(X)
|
||||
|
||||
VipsImage *im_open( const char *filename, const char *mode );
|
||||
|
||||
VipsImage *im_open_local( VipsImage *parent,
|
||||
|
@ -1065,7 +1065,7 @@ vips_image_class_init( VipsImageClass *class )
|
||||
* for old programs which are missing a vips_init() call. We must
|
||||
* have threads set up before we can process.
|
||||
*/
|
||||
if( vips_init( "vips" ) )
|
||||
if( vips__init( "vips" ) )
|
||||
vips_error_clear();
|
||||
|
||||
gobject_class->finalize = vips_image_finalize;
|
||||
|
@ -117,52 +117,41 @@ vips_get_argv0( void )
|
||||
}
|
||||
|
||||
/**
|
||||
* vips_init:
|
||||
* VIPS_INIT:
|
||||
* @argv0: name of application
|
||||
*
|
||||
* vips_init() starts up the world of VIPS. You should call this on
|
||||
* VIPS_INIT() starts up the world of VIPS. You should call this on
|
||||
* program startup before using any other VIPS operations. If you do not call
|
||||
* vips_init(), VIPS will call it for you when you use your first VIPS
|
||||
* operation, but
|
||||
* it may not be able to get hold of @argv0 and VIPS may therefore be unable
|
||||
* to find its data files. It is much better to call this function yourself.
|
||||
* VIPS_INIT(), VIPS will call it for you when you use your first VIPS
|
||||
* operation, but it may not be able to get hold of @argv0 and VIPS may
|
||||
* therefore be unable to find its data files. It is much better to call
|
||||
* this macro yourself.
|
||||
*
|
||||
* vips_init() is a macro, since it tries to check binary compatibility
|
||||
* VIPS_INIT() is a macro, since it tries to check binary compatibility
|
||||
* between the caller and the library.
|
||||
*
|
||||
* vips_init() does approximately the following:
|
||||
* VIPS_INIT() does approximately the following:
|
||||
*
|
||||
* <itemizedlist>
|
||||
* <listitem>
|
||||
* <para>checks that the libvips your program is expecting is
|
||||
* binary-compatible with the vips library you're running against</para>
|
||||
* </listitem>
|
||||
* <listitem>
|
||||
* <para>initialises any libraries that VIPS is using, including GObject
|
||||
* and the threading system, if neccessary</para>
|
||||
* </listitem>
|
||||
* <listitem>
|
||||
* <para>guesses where the VIPS data files are and sets up
|
||||
* internationalisation --- see vips_guess_prefix()
|
||||
* </para>
|
||||
* </listitem>
|
||||
* <listitem>
|
||||
* <para>creates the main vips types, including VipsImage and friends
|
||||
* </para>
|
||||
* </listitem>
|
||||
* <listitem>
|
||||
* <para>loads any plugins from $libdir/vips-x.y/, where x and y are the
|
||||
* major and minor version numbers for this VIPS.
|
||||
* </para>
|
||||
* </listitem>
|
||||
* </itemizedlist>
|
||||
* + checks that the libvips your program is expecting is
|
||||
* binary-compatible with the vips library you're running against
|
||||
*
|
||||
* + initialises any libraries that VIPS is using, including GObject
|
||||
* and the threading system, if neccessary
|
||||
*
|
||||
* + guesses where the VIPS data files are and sets up
|
||||
* internationalisation --- see vips_guess_prefix()
|
||||
*
|
||||
* + creates the main vips types, including #VipsImage and friends
|
||||
*
|
||||
* + loads any plugins from $libdir/vips-x.y/, where x and y are the
|
||||
* major and minor version numbers for this VIPS.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* |[
|
||||
* int main (int argc, char **argv)
|
||||
* {
|
||||
* if (vips_init (argv[0]))
|
||||
* if (VIPS_INIT (argv[0]))
|
||||
* vips_error_exit ("unable to start VIPS");
|
||||
*
|
||||
* vips_shutdown ();
|
||||
@ -360,7 +349,7 @@ vips_check_init( void )
|
||||
* for old programs which are missing an vips_init() call. We need
|
||||
* i18n set up before we can translate.
|
||||
*/
|
||||
if( vips_init( "giant_banana" ) )
|
||||
if( vips__init( "giant_banana" ) )
|
||||
vips_error_clear();
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ VIPS_NAMESPACE_START
|
||||
*/
|
||||
bool init( const char *argv0 )
|
||||
{
|
||||
return( vips_init( argv0 ) == 0 );
|
||||
return( vips__init( argv0 ) == 0 );
|
||||
}
|
||||
|
||||
void shutdown()
|
||||
|
@ -183,7 +183,7 @@ main( int argc, char *argv[] )
|
||||
int i;
|
||||
int result;
|
||||
|
||||
if( vips_init( argv[0] ) )
|
||||
if( vips__init( argv[0] ) )
|
||||
vips_error_exit( "unable to start VIPS" );
|
||||
textdomain( GETTEXT_PACKAGE );
|
||||
setlocale( LC_ALL, "" );
|
||||
|
@ -718,7 +718,7 @@ main( int argc, char **argv )
|
||||
GError *error = NULL;
|
||||
int i;
|
||||
|
||||
if( vips_init( argv[0] ) )
|
||||
if( vips__init( argv[0] ) )
|
||||
vips_error_exit( "unable to start VIPS" );
|
||||
textdomain( GETTEXT_PACKAGE );
|
||||
setlocale( LC_ALL, "" );
|
||||
|
Loading…
Reference in New Issue
Block a user