From 91d0e7e3d06fe6293f8e7513f30fd21585ea4305 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 6 Apr 2019 16:53:42 +0100 Subject: [PATCH] move kill mechanism to public API the vips_image_set_kill() system was internal. Move it to the public API. See eg.: https://github.com/kleisauke/net-vips/issues/31 --- ChangeLog | 1 + libvips/include/vips/image.h | 2 ++ libvips/include/vips/internal.h | 2 -- libvips/iofuncs/image.c | 7 ++----- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6142f4cf..077a40f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,7 @@ processes [jtorresfabra] - add vips_region_fetch() / _width() / _height() for language bindings - vips_text() supports justification +- move vips_image_set_kill() and iskilled() to the public API 4/1/19 started 8.7.4 - magickload with magick6 API did not chain exceptions correctly causing a diff --git a/libvips/include/vips/image.h b/libvips/include/vips/image.h index 703716a2..7353aa89 100644 --- a/libvips/include/vips/image.h +++ b/libvips/include/vips/image.h @@ -427,6 +427,8 @@ void vips_image_invalidate_all( VipsImage *image ); void vips_image_minimise_all( VipsImage *image ); void vips_image_set_progress( VipsImage *image, gboolean progress ); +gboolean vips_image_iskilled( VipsImage *image ); +void vips_image_set_kill( VipsImage *image, gboolean kill ); char *vips_filename_get_filename( const char *vips_filename ); char *vips_filename_get_options( const char *vips_filename ); diff --git a/libvips/include/vips/internal.h b/libvips/include/vips/internal.h index 62ec1319..19fb57bd 100644 --- a/libvips/include/vips/internal.h +++ b/libvips/include/vips/internal.h @@ -153,8 +153,6 @@ int vips_image_written( VipsImage *image ); void vips_image_preeval( VipsImage *image ); void vips_image_eval( VipsImage *image, guint64 processed ); void vips_image_posteval( VipsImage *image ); -gboolean vips_image_iskilled( VipsImage *image ); -void vips_image_set_kill( VipsImage *image, gboolean kill ); VipsImage *vips_image_new_mode( const char *filename, const char *mode ); int vips__formatalike_vec( VipsImage **in, VipsImage **out, int n ); diff --git a/libvips/iofuncs/image.c b/libvips/iofuncs/image.c index fd80f0e0..e08f4342 100644 --- a/libvips/iofuncs/image.c +++ b/libvips/iofuncs/image.c @@ -1598,19 +1598,18 @@ vips_image_set_progress( VipsImage *image, gboolean progress ) image->progress_signal = NULL; } - /** * vips_image_iskilled: (method) * @image: image to test * * If @image has been killed (see vips_image_set_kill()), set an error message, - * clear the #VipsImage.kill flag and return %FALSE. Otherwise return %TRUE. + * clear the #VipsImage.kill flag and return %TRUE. Otherwise return %FALSE. * * Handy for loops which need to run sets of threads which can fail. * * See also: vips_image_set_kill(). * - * Returns: %FALSE if @image has been killed. + * Returns: %TRUE if @image has been killed. */ gboolean vips_image_iskilled( VipsImage *image ) @@ -1645,8 +1644,6 @@ vips_image_iskilled( VipsImage *image ) * threads. * * See also: vips_image_iskilled(). - * - * Returns: %FALSE if @image has been killed. */ void vips_image_set_kill( VipsImage *image, gboolean kill )