guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Turning `scm_is_pair ()' into a macro


From: Han-Wen Nienhuys
Subject: Re: [PATCH] Turning `scm_is_pair ()' into a macro
Date: Wed, 14 Dec 2005 23:00:23 +0000 (UTC)

In article <address@hidden>,
Ludovic Courtès <address@hidden> 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.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]