From a585692ae33cedf1823fa788172a5e56c3ef5f2b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Sat, 15 Feb 2020 07:22:25 +0100 Subject: [PATCH] babl: babl-fish-path improve portability for ppc Quoting his explaination for why this fixes things (the other half of the same function was already portable.) "This breaks on PowerPC 32-bit, because the calling convention for passing a union is to pass a pointer to a temporary copy of the union. This pointer isn't as a function pointer. On some other platforms, the call would just copy the union, which is like copying the function pointer. On all platforms, the compiler doesn't check the type, because babl_conversion_new() has a va_arg(3) prototype." Portabilitiy issue figured out by George Koehler, This fixes issue #24. --- babl/babl-fish-path.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c index c8911d1..284d452 100644 --- a/babl/babl-fish-path.c +++ b/babl/babl-fish-path.c @@ -404,7 +404,7 @@ alias_conversion (Babl *babl, (void*)conv->source, (void*)space), babl_remodel_with_space ( (void*)conv->destination, (void*)space), - "linear", conv->function, + "linear", conv->function.linear, NULL); break; case BABL_CONVERSION_PLANAR: @@ -413,7 +413,7 @@ alias_conversion (Babl *babl, (void*)conv->source, (void*)space), babl_remodel_with_space ( (void*)conv->destination, (void*)space), - "planar", conv->function, + "planar", conv->function.planar, NULL); break; case BABL_CONVERSION_PLANE: @@ -422,7 +422,7 @@ alias_conversion (Babl *babl, (void*)conv->source, (void*)space), babl_remodel_with_space ( (void*)conv->destination, (void*)space), - "plane", conv->function, + "plane", conv->function.plane, NULL); break; default: -- 2.30.2