From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Type-error in C code Date: Fri, 12 Nov 2010 17:47:01 +0100 Message-ID: References: <4CDD5951.4030904@swipnet.se> <83oc9uee69.fsf@gnu.org> <83lj4yecnz.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1289580584 24359 80.91.229.12 (12 Nov 2010 16:49:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 12 Nov 2010 16:49:44 +0000 (UTC) Cc: jan.h.d@swipnet.se, emacs-devel@gnu.org, monnier@iro.umontreal.ca, John Yates To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 12 17:49:39 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 1PGwok-0006Z0-DU for ged-emacs-devel@m.gmane.org; Fri, 12 Nov 2010 17:49:38 +0100 Original-Received: from localhost ([127.0.0.1]:50878 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGwoi-00061p-Kv for ged-emacs-devel@m.gmane.org; Fri, 12 Nov 2010 11:49:36 -0500 Original-Received: from [140.186.70.92] (port=33127 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGwmI-0004C0-Vv for emacs-devel@gnu.org; Fri, 12 Nov 2010 11:47:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGwmI-0001Dt-2f for emacs-devel@gnu.org; Fri, 12 Nov 2010 11:47:06 -0500 Original-Received: from mail-out.m-online.net ([212.18.0.9]:45543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGwmG-0001DL-6U; Fri, 12 Nov 2010 11:47:04 -0500 Original-Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 7C5ED1C1595D; Fri, 12 Nov 2010 17:47:02 +0100 (CET) Original-Received: from hase (ppp-88-217-119-80.dynamic.mnet-online.de [88.217.119.80]) by mail.mnet-online.de (Postfix) with ESMTP id EBD801C0035C; Fri, 12 Nov 2010 17:47:01 +0100 (CET) X-Yow: I smell a RANCID CORN DOG! In-Reply-To: <83lj4yecnz.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 12 Nov 2010 18:20:48 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:132584 Archived-At: Eli Zaretskii writes: >> Date: Fri, 12 Nov 2010 11:06:26 -0500 >> From: John Yates >> >> On Fri, Nov 12, 2010 at 10:58 AM, Julien Danjou wrote: >> >> > OTOH, x_fill_property_data deals with floats too, so using a float here >> > sounds like a good solution, as you suggested. >> >> Alternatively you could check the atom's value and so long as it is in >> range you could generate an elisp integer, falling back to a float >> only when the atom is too large. > > That's what I meant, actually (we already do such things in other > places in Emacs sources). See make_fixnum_or_float. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."