unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Guile API for foreign languages: proposing SCM scm_list_0(void)
@ 2012-07-02 11:11 Alexei Matveev
  2013-01-12 15:16 ` Andy Wingo
  0 siblings, 1 reply; 12+ messages in thread
From: Alexei Matveev @ 2012-07-02 11:11 UTC (permalink / raw)
  To: guile-devel, guile-user

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;



^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-01-31 17:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-02 11:11 Guile API for foreign languages: proposing SCM scm_list_0(void) Alexei Matveev
2013-01-12 15:16 ` Andy Wingo
2013-01-14 22:44   ` Alexei Matveev
2013-01-15  9:06     ` Andy Wingo
2013-01-15  9:20       ` Ludovic Courtès
2013-01-22 10:55   ` Andy Wingo
2013-01-31 11:27     ` Andy Wingo
2013-01-31 11:45       ` Andy Wingo
2013-01-31 13:37         ` Noah Lavine
2013-01-31 14:13         ` Alexei Matveev
2013-01-31 16:57         ` Alexei Matveev
2013-01-31 17:23           ` Andy Wingo

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).