From: Alexei Matveev <alexei.matveev@gmail.com>
To: guile-devel <guile-devel@gnu.org>, guile-user@gnu.org
Subject: Guile API for foreign languages: proposing SCM scm_list_0(void)
Date: Mon, 2 Jul 2012 13:11:14 +0200 [thread overview]
Message-ID: <CACMrLAddN9W7C3ATHPTPpsqXJyQ4A0sbDwAZ4vo27jEL-iiS9Q@mail.gmail.com> (raw)
Quote from
http://lists.gnu.org/archive/html/guile-devel/2001-06/msg00348.html
>> Do we want scm_list_0 to scm_list_9 anyway?
>
> I'd say, forget about scm_list_0. With respect to the others, we should
> at least provide those which are used in libguile (egoistic point of
> view, isn't it?). About the rest up to 9 I don't know/mind.
Hi, All,
To raise this question again: I ended up with a wrapper
function for a Fortran project equivalent to the scm_list_0()
quoted below. The reason is accessing macros from languages
other than C is cumbersome.
Contrary to scm_from/to_int, scm_is_* and other macros
adding this as a funciton one is a no-brainer, since it would
be a new API call and raises no compatibility concerns.
What do you think? Do you count from 0 or from 1?
Alexei
P.S.: the next on my which list would be scm_undefined().
$ git diff libguile/list.c
diff --git a/libguile/list.c b/libguile/list.c
index 8297b17..e253510 100644
--- a/libguile/list.c
+++ b/libguile/list.c
@@ -41,6 +41,12 @@
} while (0)
SCM
+scm_list_0 ()
+{
+ return SCM_EOL; /* macro */
+}
+
+SCM
scm_list_1 (SCM e1)
{
SCM c1;
next reply other threads:[~2012-07-02 11:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-02 11:11 Alexei Matveev [this message]
2013-01-12 15:16 ` Guile API for foreign languages: proposing SCM scm_list_0(void) Andy Wingo
2013-01-14 22:44 ` Alexei Matveev
2013-01-15 9:06 ` Andy Wingo
2013-01-15 9:20 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACMrLAddN9W7C3ATHPTPpsqXJyQ4A0sbDwAZ4vo27jEL-iiS9Q@mail.gmail.com \
--to=alexei.matveev@gmail.com \
--cc=guile-devel@gnu.org \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).