From 82b1ee1b8a72ab98c8cf7e4f2e8fd736c2665f24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Thu, 9 Jan 2025 12:55:18 +0100 Subject: [PATCH] hook: avoid macro expansion of the method names Fixes #4491 --- spa/include/spa/utils/hook.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spa/include/spa/utils/hook.h b/spa/include/spa/utils/hook.h index aea18d28e..9de4a5700 100644 --- a/spa/include/spa/utils/hook.h +++ b/spa/include/spa/utils/hook.h @@ -158,14 +158,14 @@ struct spa_interface { const type *_f = (const type *) (callbacks)->funcs; \ bool _res = SPA_CALLBACK_CHECK(_f,method,vers); \ if (SPA_LIKELY(_res)) \ - _f->method((callbacks)->data, ## __VA_ARGS__); \ + (_f->method)((callbacks)->data, ## __VA_ARGS__); \ _res; \ }) #define spa_callbacks_call_fast(callbacks,type,method,vers,...) \ ({ \ const type *_f = (const type *) (callbacks)->funcs; \ - _f->method((callbacks)->data, ## __VA_ARGS__); \ + (_f->method)((callbacks)->data, ## __VA_ARGS__); \ true; \ }) @@ -199,13 +199,13 @@ struct spa_interface { ({ \ const type *_f = (const type *) (callbacks)->funcs; \ if (SPA_LIKELY(SPA_CALLBACK_CHECK(_f,method,vers))) \ - res = _f->method((callbacks)->data, ## __VA_ARGS__); \ + res = (_f->method)((callbacks)->data, ## __VA_ARGS__); \ res; \ }) #define spa_callbacks_call_fast_res(callbacks,type,res,method,vers,...) \ ({ \ const type *_f = (const type *) (callbacks)->funcs; \ - res = _f->method((callbacks)->data, ## __VA_ARGS__); \ + res = (_f->method)((callbacks)->data, ## __VA_ARGS__); \ }) /**