>From 0bc659d2ef1ad5ef7e0a821ffd35904807c377c7 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 21 May 2014 21:24:42 +0200 Subject: [PATCH 3/5] SBUS: Consolidate VTABLE_FUNC definitions in sssd_dbus_meta.h We had several duplicated declarations of the VTABLE_FUNC macro in the SSSD source code. This patch consolidates on one definition in sssd_dbus_meta.h that is usable by all consumers, including the upcoming GetAll method implementation. --- src/sbus/sssd_dbus_connection.c | 4 ---- src/sbus/sssd_dbus_meta.h | 4 ++++ src/sbus/sssd_dbus_private.h | 4 ---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/sbus/sssd_dbus_connection.c b/src/sbus/sssd_dbus_connection.c index af1c8c56afee7a033e90bc6b2e92c7d8258139a0..06256a85b5e81b39d50923db6d41b64015114ce1 100644 --- a/src/sbus/sssd_dbus_connection.c +++ b/src/sbus/sssd_dbus_connection.c @@ -394,10 +394,6 @@ static bool sbus_iface_handles_path(struct sbus_interface_p *intf_p, return strcmp(path, intf_p->intf->path) == 0; } -/* Looks up a vtable func, in a struct derived from struct sbus_vtable */ -#define VTABLE_FUNC(vtable, offset) \ - (*((void **)((char *)(vtable) + (offset)))) - static void sbus_handler_got_caller_id(struct tevent_req *req); /* messsage_handler diff --git a/src/sbus/sssd_dbus_meta.h b/src/sbus/sssd_dbus_meta.h index 4e170b7d6ce5fb8f68109e496ab96cfdf889d864..f25b1ac28abf1b1ef53fa54a090fa84ef868ab77 100644 --- a/src/sbus/sssd_dbus_meta.h +++ b/src/sbus/sssd_dbus_meta.h @@ -33,6 +33,10 @@ * http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format */ +/* Looks up a vtable func, in a struct derived from struct sbus_vtable */ +#define VTABLE_FUNC(vtable, offset) \ + (*((void **)((char *)(vtable) + (offset)))) + struct sbus_arg_meta { const char *name; const char *type; diff --git a/src/sbus/sssd_dbus_private.h b/src/sbus/sssd_dbus_private.h index fa11bc1c8ef625ba6c6e9382d7ccd146eabdbb26..624448d30526eb4e927f22f133451c9a63c2cebd 100644 --- a/src/sbus/sssd_dbus_private.h +++ b/src/sbus/sssd_dbus_private.h @@ -68,10 +68,6 @@ struct sbus_connection { struct sbus_watch_ctx *watch_list; }; -/* Looks up a vtable func, in a struct derived from struct sbus_vtable */ -#define VTABLE_FUNC(vtable, offset) \ - (*((void **)((char *)(vtable) + (offset)))) - /* =Watches=============================================================== */ struct sbus_watch_ctx { -- 1.9.0