From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Turning `scm_is_pair ()' into a macro Date: Thu, 15 Dec 2005 01:19:13 +0200 Message-ID: <87ek4ftgge.fsf@zagadka.de> References: <87wti7pwie.fsf@laas.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1134605471 13149 80.91.229.2 (15 Dec 2005 00:11:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Dec 2005 00:11:11 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Dec 15 01:11:00 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Emgga-0003kt-Ht for guile-devel@m.gmane.org; Thu, 15 Dec 2005 01:09:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Emgh8-0002bo-Py for guile-devel@m.gmane.org; Wed, 14 Dec 2005 19:10:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Emfuq-0008Hh-53 for guile-devel@gnu.org; Wed, 14 Dec 2005 18:20:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Emfuk-0008GK-Sn for guile-devel@gnu.org; Wed, 14 Dec 2005 18:20:07 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Emfuk-0008GF-CC for guile-devel@gnu.org; Wed, 14 Dec 2005 18:20:02 -0500 Original-Received: from [213.243.153.37] (helo=smtp1.pp.htv.fi) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Emfwt-00043S-B8 for guile-devel@gnu.org; Wed, 14 Dec 2005 18:22:15 -0500 Original-Received: from zagadka.ping.de (cs181072157.pp.htv.fi [82.181.72.157]) by smtp1.pp.htv.fi (Postfix) with SMTP id E6DDF7FC4B for ; Thu, 15 Dec 2005 01:19:21 +0200 (EET) Original-Received: (qmail 20777 invoked by uid 1000); 15 Dec 2005 01:19:14 +0200 Original-To: guile-devel@gnu.org In-Reply-To: <87wti7pwie.fsf@laas.fr> (Ludovic =?iso-8859-1?Q?Court=E8s's?= message of "Wed, 14 Dec 2005 15:46:01 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5521 Archived-At: ludovic.courtes@laas.fr (Ludovic Court=E8s) writes: > I believe it *really* makes sense to turn `scm_is_pair ()' into a macro= . Yep. But what about an inline function? There is some machinery in inline.h for this and we already use it for scm_cell, for example. > +#define scm_is_pair(__obj) (SCM_I_CONSP (__obj)) SCM_I_CONSP is not a safe macro, it expands its argument twice so we shouldn't use it just like this. (What is the point of the double underscores?) (It is true that I didn't care about performance at all when introducing scm_is_pair and your approach is the exactly right one: profile and identify the real bottlenecks.) --=20 GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel