From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: hanwen@byrd.xs4all.nl (Han-Wen Nienhuys) Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Turning `scm_is_pair ()' into a macro Date: Wed, 14 Dec 2005 23:00:23 +0000 (UTC) Organization: LilyPond development Message-ID: References: <87wti7pwie.fsf@laas.fr> Reply-To: hanwen@xs4all.nl NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1134604846 11447 80.91.229.2 (15 Dec 2005 00:00:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Dec 2005 00:00:46 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Dec 15 01:00:45 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EmgVw-0008WO-AK for guile-devel@m.gmane.org; Thu, 15 Dec 2005 00:58:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EmgWX-0007fJ-T3 for guile-devel@m.gmane.org; Wed, 14 Dec 2005 18:59:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Emffb-0008RJ-Fu for guile-devel@gnu.org; Wed, 14 Dec 2005 18:04:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EmffW-0008QN-23 for guile-devel@gnu.org; Wed, 14 Dec 2005 18:04:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EmffV-0008QJ-Dc for guile-devel@gnu.org; Wed, 14 Dec 2005 18:04:17 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Emfhe-0000hu-C8 for guile-devel@gnu.org; Wed, 14 Dec 2005 18:06:30 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Emfd9-00052c-Q9 for guile-devel@gnu.org; Thu, 15 Dec 2005 00:01:51 +0100 Original-Received: from muurbloem.xs4all.nl ([213.84.26.127]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Dec 2005 00:01:51 +0100 Original-Received: from hanwen by muurbloem.xs4all.nl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Dec 2005 00:01:51 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: guile-devel@gnu.org Original-Lines: 18 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: muurbloem.xs4all.nl X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Originator: hanwen@byrd.xs4all.nl (Han-Wen Nienhuys) 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:5520 Archived-At: In article <87wti7pwie.fsf@laas.fr>, Ludovic Courtès wrote: >Hi, > >I believe it *really* makes sense to turn `scm_is_pair ()' into a macro. > >--- orig/libguile/pairs.h >+++ mod/libguile/pairs.h >@@ -78,7 +78,7 @@ > SCM_API void scm_error_pair_access (SCM); > #endif > >-SCM_API int scm_is_pair (SCM x); >+#define scm_is_pair(__obj) (SCM_I_CONSP (__obj)) Why not use an inline function? That's cleaner, and you get the backward compat for free. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel