emit "finish" at the end of targetcustom write

In 8.13 we deprecated target_finish() (it did not have an error return)
to target_end() (now has an error return).

This PR makes target_end() also emit the "finish" signal for
compatibility with the previous API. ruby-vips, for example, looks for
on_finish() to close files.

See https://github.com/libvips/ruby-vips/issues/351

Thanks lucaskanashiro
This commit is contained in:
John Cupitt 2022-12-16 11:32:16 +00:00
parent 27874386b2
commit caed71af04
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,6 @@
9/11/22 started 8.13.4
- missing include in mosaic_fuzzer [ServOKio]
- emit "finish" at the end of targetcustom write [lucaskanashiro]
11/10/22 started 8.13.3
- improve rules for 16-bit heifsave [johntrunc]

View File

@ -161,6 +161,11 @@ vips_target_custom_end_real( VipsTarget *target )
VIPS_DEBUG_MSG( "vips_target_custom_end_real:\n" );
/* For compatibility with oklder libvipses, we have to emit "finish"
* as well. ruby-vips relies on this.
*/
g_signal_emit( target, vips_target_custom_signals[SIG_FINISH], 0 );
/* Return value if no attached handler.
*/
result = 0;