From 2c678779930ec559efeb3562f6abea57c4af8143 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Sat, 21 Sep 2024 17:53:45 +0200 Subject: [PATCH] Fix `type_map()` (#488) 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);