From 886d29fced0bcc1668a3cb99a5bca66ea486b3a4 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 21 May 2014 21:24:42 +0200 Subject: SBUS: Consolidate VTABLE_FUNC definitions in sssd_dbus_meta.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Reviewed-by: Pavel Březina Reviewed-by: Lukáš Slebodník --- src/sbus/sssd_dbus_meta.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/sbus/sssd_dbus_meta.h') diff --git a/src/sbus/sssd_dbus_meta.h b/src/sbus/sssd_dbus_meta.h index 89f11224b..2cb9e95e3 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; -- cgit