unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: gianluca giorgolo <giorghy@yahoo.it>
To: guile-user@gnu.org
Subject: gh_new_procedure with c++
Date: Sun, 22 Jun 2008 22:13:44 +0000 (GMT)	[thread overview]
Message-ID: <270252.38285.qm@web26905.mail.ukl.yahoo.com> (raw)

Hi,

I'm sorry if the question has already been answered on the list but I couldn't find any reference to the topic in the archive (nor in guile user manual).

I'm trying to use 'gh_new_procedure' to define a new procedure for Scheme that refers to a c++ function. This function takes more than 0 arguments. But given that the gh_new_procedure is defined as taking a function with no argument, g++ complains about the invalid conversion:

main.cpp:131: error: invalid conversion from ‘scm_unused_struct* (*)(scm_unused_struct*, scm_unused_struct*, scm_unused_struct*, scm_unused_struct*, scm_unused_struct*)’ to ‘scm_unused_struct* (*)()’
main.cpp:131: error:   initializing argument 2 of ‘scm_unused_struct* gh_new_procedure(const char*, scm_unused_struct* (*)(), int, int, int)’

(I'm using guile 1.8.1 and gcc 4.1.3)

Is there any way to avoid the type conversion that apparently g++ doesn't like?

Thanks a lot in advance for any reply!

Gianluca



      ___________________________________ 
Scopri il Blog di Yahoo! Mail: trucchi, novità, consigli... e la tua opinione!
http://www.ymailblogit.com/blog/




             reply	other threads:[~2008-06-22 22:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-22 22:13 gianluca giorgolo [this message]
2008-06-23  9:59 ` gh_new_procedure with c++ Ludovic Courtès
2008-06-23 11:47   ` 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=270252.38285.qm@web26905.mail.ukl.yahoo.com \
    --to=giorghy@yahoo.it \
    --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).