From 9a030ba29989a287a7a1c8ea250b12c597bf1623 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 6 Mar 2016 11:06:25 +0100 Subject: [PATCH] dbus.c: Fix handling of DBUS_TYPE_BYTE From the DBus docs of DBUS_TYPE_BYTE: Type code marking an 8-bit unsigned integer. Signed-off-by: Uli Schlachter --- dbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbus.c b/dbus.c index bb7e7792..e21f1d84 100644 --- a/dbus.c +++ b/dbus.c @@ -325,7 +325,6 @@ a_dbus_convert_value(lua_State *L, int idx, DBusMessageIter *iter) } \ break; DBUS_MSG_RETURN_HANDLE_TYPE_STRING(DBUS_TYPE_STRING) - DBUS_MSG_RETURN_HANDLE_TYPE_STRING(DBUS_TYPE_BYTE) #undef DBUS_MSG_RETURN_HANDLE_TYPE_STRING #define DBUS_MSG_RETURN_HANDLE_TYPE_NUMBER(type, dbustype) \ case dbustype: \ @@ -334,6 +333,7 @@ a_dbus_convert_value(lua_State *L, int idx, DBusMessageIter *iter) dbus_message_iter_append_basic(iter, dbustype, &num); \ } \ break; + DBUS_MSG_RETURN_HANDLE_TYPE_NUMBER(uint8_t, DBUS_TYPE_BYTE) DBUS_MSG_RETURN_HANDLE_TYPE_NUMBER(int16_t, DBUS_TYPE_INT16) DBUS_MSG_RETURN_HANDLE_TYPE_NUMBER(uint16_t, DBUS_TYPE_UINT16) DBUS_MSG_RETURN_HANDLE_TYPE_NUMBER(int32_t, DBUS_TYPE_INT32)