Commit 1cae01f7 authored by Andreas Schwab's avatar Andreas Schwab

(xd_retrieve_arg): Handle DBUS_TYPE_INTnn and

DBUS_TYPE_UINTnn separately to get proper sign extension.
parent 58a12889
2009-10-24 Andreas Schwab <schwab@linux-m68k.org>
* dbusbind.c (xd_retrieve_arg): Handle DBUS_TYPE_INTnn and
DBUS_TYPE_UINTnn separately to get proper sign extension.
* dired.c (Ffile_attributes): Simplify now that FIXNUM_OVERFLOW_P
can properly handle unsigned types.
(make_uid, make_gid): Removed.
......
......@@ -616,6 +616,13 @@ xd_retrieve_arg (dtype, iter)
}
case DBUS_TYPE_INT16:
{
dbus_int16_t val;
dbus_message_iter_get_basic (iter, &val);
XD_DEBUG_MESSAGE ("%c %d", dtype, val);
return make_number (val);
}
case DBUS_TYPE_UINT16:
{
dbus_uint16_t val;
......@@ -625,19 +632,29 @@ xd_retrieve_arg (dtype, iter)
}
case DBUS_TYPE_INT32:
{
dbus_int32_t val;
dbus_message_iter_get_basic (iter, &val);
XD_DEBUG_MESSAGE ("%c %d", dtype, val);
return make_fixnum_or_float (val);
}
case DBUS_TYPE_UINT32:
{
/* Assignment to EMACS_INT stops GCC whining about limited
range of data type. */
dbus_uint32_t val;
EMACS_INT val1;
dbus_message_iter_get_basic (iter, &val);
XD_DEBUG_MESSAGE ("%c %d", dtype, val);
val1 = val;
return make_fixnum_or_float (val1);
return make_fixnum_or_float (val);
}
case DBUS_TYPE_INT64:
{
dbus_int64_t val;
dbus_message_iter_get_basic (iter, &val);
XD_DEBUG_MESSAGE ("%c %d", dtype, (int) val);
return make_fixnum_or_float (val);
}
case DBUS_TYPE_UINT64:
{
dbus_uint64_t val;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment