From d2bdf903fed4b3b87a185e8ca09aa40f0c23575c Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Mon, 15 Jul 2024 16:03:16 +0200 Subject: [PATCH] Fix `type_map()` We cannot declare `VipsTypeMap2Fn` as opaque as this callback is used by `type_map()`. Instead, restore the `VipsTypeMap2Fn` definition and use an opaque pointer for the second argument of `vips_type_map()`. --- pyvips/vdecls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyvips/vdecls.py b/pyvips/vdecls.py index 547debb..d142268 100644 --- a/pyvips/vdecls.py +++ b/pyvips/vdecls.py @@ -72,8 +72,8 @@ def cdefs(features): const char* g_type_name (GType gtype); GType g_type_from_name (const char* name); - typedef ... VipsTypeMap2Fn; - void* vips_type_map (GType base, VipsTypeMap2Fn fn, void* a, void* b); + typedef void* (*VipsTypeMap2Fn) (GType type, void* a, void* b); + void* vips_type_map (GType base, void* fn, void* a, void* b); const char* vips_error_buffer (void); void vips_error_clear (void);