added vips::init() and vips::shutdown()

OS X mav was having trouble linking im_init_world() via the C++ API, so
we now have C++ functions for startup and shutdown.
This commit is contained in:
John Cupitt 2013-12-11 14:43:58 +00:00
parent 9167767179
commit 61068cd03d
3 changed files with 18 additions and 0 deletions

View File

@ -26,6 +26,7 @@
- added --vips-profile, records and dumps thread timing and memory use info
- added vipsprofile, visualises --vips-profile output
- auto-vectorization-friendly inner loops
- added vips::init() and vips::shutdown() to C++ API
20/11/13 started 7.36.5
- better cache sizing in unbuffered sequential mode

View File

@ -52,6 +52,18 @@
VIPS_NAMESPACE_START
/* Useful to have these as C++ functions.
*/
bool init( const char *argv0 )
{
return( vips_init( argv0 ) );
}
void shutdown( void )
{
vips_shutdown();
}
void VImage::refblock::debug_print()
{
std::list<refblock *>::iterator i;

View File

@ -60,6 +60,11 @@ extern "C" {
VIPS_NAMESPACE_START
/* vips_init() and vips_shutdown as namespaced C++ functions.
*/
bool init( const char *argv0 );
void shutdown( void );
/* A VIPS callback, our name for im_callback_fn.
*/
typedef int (*VCallback)( void *, void * );