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
This commit is contained in:
John Cupitt 2019-04-06 16:53:42 +01:00
parent 8e55732bcd
commit 91d0e7e3d0
4 changed files with 5 additions and 7 deletions

View File

@ -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

View File

@ -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 );

View File

@ -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 );

View File

@ -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 )