comparison src/dbusbind.c @ 87533:d24ee3180427

* dbusbind.c (xd_append_arg): Use unsigned char instead of unsigned int for byte values (necessary for big-endian platform).
author Magnus Henoch <mange@freemail.hu>
date Thu, 03 Jan 2008 16:32:54 +0000
parents 38cad849184d
children 6dcf49457032
comparison
equal deleted inserted replaced
87532:5e0aa4ec4b9d 87533:d24ee3180427
1 /* Elisp bindings for D-Bus. 1 /* Elisp bindings for D-Bus.
2 Copyright (C) 2007 Free Software Foundation, Inc. 2 Copyright (C) 2007, 2008 Free Software Foundation, Inc.
3 3
4 This file is part of GNU Emacs. 4 This file is part of GNU Emacs.
5 5
6 GNU Emacs is free software; you can redistribute it and/or modify 6 GNU Emacs is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
339 if (XD_BASIC_DBUS_TYPE (dtype)) 339 if (XD_BASIC_DBUS_TYPE (dtype))
340 switch (dtype) 340 switch (dtype)
341 { 341 {
342 case DBUS_TYPE_BYTE: 342 case DBUS_TYPE_BYTE:
343 { 343 {
344 unsigned int val = XUINT (object) & 0xFF; 344 unsigned char val = XUINT (object) & 0xFF;
345 XD_DEBUG_MESSAGE ("%c %d", dtype, val); 345 XD_DEBUG_MESSAGE ("%c %d", dtype, val);
346 if (!dbus_message_iter_append_basic (iter, dtype, &val)) 346 if (!dbus_message_iter_append_basic (iter, dtype, &val))
347 xsignal2 (Qdbus_error, 347 xsignal2 (Qdbus_error,
348 build_string ("Unable to append argument"), object); 348 build_string ("Unable to append argument"), object);
349 return; 349 return;