From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: Dbus method argument encoding problem Date: Mon, 28 Jun 2010 14:37:51 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: dough.gmane.org 1277758417 12850 80.91.229.12 (28 Jun 2010 20:53:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 28 Jun 2010 20:53:37 +0000 (UTC) To: "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 28 22:53:36 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OTLKd-00045k-Fi for ged-emacs-devel@m.gmane.org; Mon, 28 Jun 2010 22:53:31 +0200 Original-Received: from localhost ([127.0.0.1]:53717 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTLEp-0006KG-DZ for ged-emacs-devel@m.gmane.org; Mon, 28 Jun 2010 16:47:31 -0400 Original-Received: from [140.186.70.92] (port=58402 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTLEi-0006GP-S7 for emacs-devel@gnu.org; Mon, 28 Jun 2010 16:47:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTLEg-0007NP-Kh for emacs-devel@gnu.org; Mon, 28 Jun 2010 16:47:24 -0400 Original-Received: from ebb05.tieto.com ([131.207.168.36]:43652) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTLEe-0007MY-Ml for emacs-devel@gnu.org; Mon, 28 Jun 2010 16:47:22 -0400 X-AuditID: 83cfa824-b7cacae0000043cc-55-4c290a1855d2 Original-Received: from FIVLA-EXHUB02.eu.tieto.com ( [131.207.136.42]) by ebb05.tieto.com (SMTP Mailer) with SMTP id 6A.B6.17356.81A092C4; Mon, 28 Jun 2010 23:46:17 +0300 (EEST) Original-Received: from uw000509 (10.48.99.3) by inbound.tieto.com (131.207.136.49) with Microsoft SMTP Server id 8.2.176.0; Mon, 28 Jun 2010 15:37:53 +0300 User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2.50 (gnu/linux) X-Brightmail-Tracker: AAAAAA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:126479 Archived-At: I have been experimenting to the pidgin chat client over dbus and have run into a problem with method calls. This is with emacs "23.2.50.1" (as taking from bzr a few weeks ago) on Linux. I want to call the PurpleBuddyGetName() method which takes a number as argument. If I call: (dbus-call-method :session "im.pidgin.purple.PurpleService" "/im/pidgin/purple/PurpleObject" "im.pidgin.purple.PurpleService" "PurpleBuddyGetName" 4671) I get the following error: (dbus-error "Argument 0 is specified to be of type \"int32\", but is actually of type \"uint32\"") If one looks at the documentation of `dbus-call-method', I see the following encoding scheme for method arguments: ... number => DBUS_TYPE_UINT32 integer => DBUS_TYPE_INT32 ... I am guessing that `4671' matches `number' and thus is encoded as a UINT32 but pidgin/libpurple insists on it being an INT32. One thing is that the documentation should probably say "natural number" instead of just "number" (since all integers are conventionally also numbers), but how can I force a positive integer to encode as INT32? ------------------------+----------------------------------------------------- Christian Lynbech | christian #\@ defun #\. dk ------------------------+----------------------------------------------------- Hit the philistines three times over the head with the Elisp reference manual. - petonic@hal.com (Michael A. Petonic)