From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOe8p-0002Gg-CF for qemu-devel@nongnu.org; Mon, 23 May 2011 19:02:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOe8n-0008SE-CB for qemu-devel@nongnu.org; Mon, 23 May 2011 19:02:27 -0400 Received: from mail2.shareable.org ([80.68.89.115]:43100) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOe8n-0008S3-4L for qemu-devel@nongnu.org; Mon, 23 May 2011 19:02:25 -0400 Date: Tue, 24 May 2011 00:02:22 +0100 From: Jamie Lokier Message-ID: <20110523230222.GL969@shareable.org> References: <20110520180331.GA21837@amd.home.annexia.org> <4DD6AEB9.6060506@codemonkey.ws> <20110523130411.GR24143@redhat.com> <4DDA620F.1090308@codemonkey.ws> <20110523134021.GT24143@redhat.com> <4DDA663F.30907@codemonkey.ws> <4DDA7829.5090103@codemonkey.ws> <20110523151948.GJ27503@amd.home.annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110523151948.GJ27503@amd.home.annexia.org> Subject: [Qemu-devel] Use a hex string (was: [PATCH] qemu: json: Fix parsing of integers >= 0x8000000000000000) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: qemu-devel@nongnu.org, Markus Armbruster , Luiz Capitulino Richard W.M. Jones wrote: > The problem is to be able to send 64 bit memory and disk offsets > faithfully. This doesn't just fail to solve the problem, it's > actually going to make it a whole lot worse. Such offsets would be so much more readable in hexadecimal. So why not use a string "0xffff800012340000" instead? That is universally Javascript compatible as well as much more convenient for humans. Or at least, *accept* a hex string wherever a number is required by QMP (just because hex is convenient anyway, no compatibility issue), and *emit* a hex string where the number may be out of Javascript's unambiguous range, or where a hex string would make more sense anyway. -- Jamie