From 276fc83fa1cd7bdcac82a265f1812a809961a7b3 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Thu, 26 Jan 2017 08:46:27 +0000 Subject: [PATCH] more VIPS_INIT() docs see https://github.com/jcupitt/libvips/issues/588 --- libvips/iofuncs/init.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libvips/iofuncs/init.c b/libvips/iofuncs/init.c index d3d9aa6b..3b7efb23 100644 --- a/libvips/iofuncs/init.c +++ b/libvips/iofuncs/init.c @@ -135,8 +135,13 @@ vips_get_argv0( void ) * 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 - * between the caller and the library. + * Additionally, VIPS_INIT() can be run from any thread, but it must not be + * called from more than one thread at the same time. This is much easier to + * guarantee if you call it yourself. + * + * VIPS_INIT() is a macro, since it tries to check ABI compatibility + * between the caller and the library. You can also call vips_init(), the + * non-macro version, if macros are not available to you. * * You may call VIPS_INIT() many times and vips_shutdown() many times, but you * must not call VIPS_INIT() after vips_shutdown(). In other words, you cannot @@ -249,7 +254,6 @@ vips_load_plugins( const char *fmt, ... ) * * Returns: 0 on success, -1 otherwise */ - int vips_init( const char *argv0 ) {