more vips_check_init() out of API

now private
This commit is contained in:
John Cupitt 2014-08-18 15:53:17 +01:00
parent 1abcc1eae4
commit 7c8ec68448
6 changed files with 14 additions and 18 deletions

View File

@ -242,12 +242,7 @@ im_open( const char *filename, const char *mode )
{
VipsImage *image;
/* Pass in a nonsense name for argv0 ... this init path is only here
* for old programs which are missing an vips_init() call. We need
* i18n set up before we can translate.
*/
if( vips__init( "giant_banana" ) )
vips_error_clear();
vips_check_init();
/* We have to go via the old VipsFormat system so we can support the
* "filename:option" syntax.

View File

@ -52,6 +52,8 @@ typedef struct _VipsMeta {
GValue value; /* copy of value */
} VipsMeta;
void vips_check_init( void );
void vips__meta_init_types( void );
void vips__meta_destroy( VipsImage *im );
int vips__meta_cp( VipsImage *, const VipsImage * );

View File

@ -175,7 +175,6 @@ extern "C" {
vips__init( ARGV0 ))
const char *vips_get_argv0( void );
void vips_check_init( void );
void vips_shutdown( void );
void vips_thread_shutdown( void );
GOptionGroup *vips_get_option_group( void );

View File

@ -1061,12 +1061,9 @@ vips_image_class_init( VipsImageClass *class )
VIPS_DEBUG_MSG( "vips_image_class_init:\n" );
/* Pass in a nonsense name for argv0 ... this init world is only here
* for old programs which are missing a vips_init() call. We must
* have threads set up before we can process.
/* We must have threads set up before we can process.
*/
if( vips__init( "vips" ) )
vips_error_clear();
vips_check_init();
gobject_class->finalize = vips_image_finalize;
gobject_class->dispose = vips_image_dispose;

View File

@ -349,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( "vips" ) )
vips_error_clear();
}
@ -393,9 +393,11 @@ vips_leak( void )
* by vips_g_thread_new().
*
* You will need to call it from threads created in
* other ways. If you do not call it, vips will generate an error message.
* other ways or there will be memory leaks. If you do not call it, vips
* will generate a warning message.
*
* May be called many times.
* It may be called many times, and you can continue using vips after
* calling it. Calling it too often will reduce performance.
*/
void
vips_thread_shutdown( void )
@ -561,14 +563,14 @@ static GOptionEntry option_entries[] = {
/**
* vips_get_option_group: (skip)
*
* vips_get_option_group() returns a GOptionGroup containing various VIPS
* command-line options. It can be used with GOption to help
* vips_get_option_group() returns a %GOptionGroup containing various VIPS
* command-line options. It can be used with %GOption to help
* parse argc/argv.
*
* See also: vips_version(), vips_guess_prefix(),
* vips_guess_libdir(), vips_init().
*
* Returns: a GOptionGroup for VIPS, see GOption
* Returns: a %GOptionGroup for VIPS, see %GOption
*/
GOptionGroup *
vips_get_option_group( void )

View File

@ -43,6 +43,7 @@
#include <math.h>
#include <vips/vips.h>
#include <vips/internal.h>
#include <vips/debug.h>
#include <gobject/gvaluecollector.h>