unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: "wangy01" <wangy01@mails.tsinghua.edu.cn>
Subject: Calling Scheme procedure from C ?
Date: Fri, 11 Jul 2003 10:11:30 +0800	[thread overview]
Message-ID: <257889490.11085@mails.tsinghua.edu.cn> (raw)


I want to make a Scheme call "(write 10)" from my C code. I wrote:
 proc = scm_c_lookup("write");
 scm_apply(proc, SCM_MAKINUM(10), scm_listofnull);
but guile said:
        ERROR: In procedure apply:
        ERROR: Wrong type argument in position 1: #<variable 8096d70
binding: #<primitive-procedure write>>
, then I tried:
 proc = scm_c_lookup("write");
 scm_apply(proc, scm_cons(SCM_MAKINUM(10)), scm_listofnull);
guile printed the same error messages again.

What should I do?




_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


             reply	other threads:[~2003-07-11  2:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-11  2:11 wangy01 [this message]
2003-07-13 18:18 ` Calling Scheme procedure from C ? Andreas Rottmann

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=257889490.11085@mails.tsinghua.edu.cn \
    --to=wangy01@mails.tsinghua.edu.cn \
    /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).