From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Julien Danjou Newsgroups: gmane.emacs.devel Subject: Re: Type-error in C code Date: Fri, 12 Nov 2010 16:32:10 +0100 Message-ID: References: <4CDD5951.4030904@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1289575951 32448 80.91.229.12 (12 Nov 2010 15:32:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 12 Nov 2010 15:32:31 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Jan =?utf-8?Q?Dj=C3=A4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 12 16:32:27 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 1PGvbx-000428-SB for ged-emacs-devel@m.gmane.org; Fri, 12 Nov 2010 16:32:22 +0100 Original-Received: from localhost ([127.0.0.1]:58806 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGvbx-0002d8-Ab for ged-emacs-devel@m.gmane.org; Fri, 12 Nov 2010 10:32:21 -0500 Original-Received: from [140.186.70.92] (port=36096 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGvbo-0002YU-Jc for emacs-devel@gnu.org; Fri, 12 Nov 2010 10:32:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGvbn-0007UZ-JP for emacs-devel@gnu.org; Fri, 12 Nov 2010 10:32:12 -0500 Original-Received: from coquelicot-s.easter-eggs.com ([213.215.37.94]:41720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGvbn-0007UT-AY for emacs-devel@gnu.org; Fri, 12 Nov 2010 10:32:11 -0500 Original-Received: from cigue.easter-eggs.fr (cigue.easter-eggs.fr [10.0.0.33]) by rose.easter-eggs.fr (Postfix) with ESMTPS id 765F0140D2; Fri, 12 Nov 2010 16:32:07 +0100 (CET) Original-Received: from jdanjou by cigue.easter-eggs.fr with local (Exim 4.72) (envelope-from ) id 1PGvbm-0008UO-Qc; Fri, 12 Nov 2010 16:32:10 +0100 Mail-Followup-To: Jan =?utf-8?Q?Dj=C3=A4rv?= , Stefan Monnier , emacs-devel@gnu.org In-Reply-To: (Julien Danjou's message of "Fri, 12 Nov 2010 16:28:45 +0100") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) 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:132577 Archived-At: On Fri, Nov 12 2010, Julien Danjou wrote: > Ok, reading the Lisp_Object definition explains why. I've learned > something today. :) I've replying again to myself, but I'm still discovering the internal. Sorry. It seems we can store 32 bits unsigned using XSETFASTINT. Reading x_fill_property_data, I see: --8<---------------cut here---------------start------------->8--- for (iter =3D data; CONSP (iter); iter =3D XCDR (iter)) { Lisp_Object o =3D XCAR (iter); if (INTEGERP (o)) val =3D (long) XFASTINT (o); --8<---------------cut here---------------end--------------->8--- So IIUC, we could use XSETFASTINT to store the atom. Am I wrong? --=20 Julien Danjou // =E1=90=B0 http://julien.danjou.info