From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: gianluca giorgolo Newsgroups: gmane.lisp.guile.user Subject: gh_new_procedure with c++ Date: Sun, 22 Jun 2008 22:13:44 +0000 (GMT) Message-ID: <270252.38285.qm@web26905.mail.ukl.yahoo.com> Reply-To: giorghy@yahoo.it NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1214172850 29905 80.91.229.12 (22 Jun 2008 22:14:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 22 Jun 2008 22:14:10 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Jun 23 00:14:54 2008 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KAXpf-0004yn-3k for guile-user@m.gmane.org; Mon, 23 Jun 2008 00:14:47 +0200 Original-Received: from localhost ([127.0.0.1]:47603 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KAXop-0006Fk-Ou for guile-user@m.gmane.org; Sun, 22 Jun 2008 18:13:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KAXok-0006FS-VY for guile-user@gnu.org; Sun, 22 Jun 2008 18:13:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KAXog-0006Ep-79 for guile-user@gnu.org; Sun, 22 Jun 2008 18:13:49 -0400 Original-Received: from [199.232.76.173] (port=35174 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KAXog-0006Em-14 for guile-user@gnu.org; Sun, 22 Jun 2008 18:13:46 -0400 Original-Received: from web26905.mail.ukl.yahoo.com ([217.146.176.94]:39429) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KAXof-0001r4-MX for guile-user@gnu.org; Sun, 22 Jun 2008 18:13:45 -0400 Original-Received: (qmail 38807 invoked by uid 60001); 22 Jun 2008 22:13:44 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.it; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=SYuCqalgMeZNkbaCJSVKbjiTiNwMf49qstt3xbcPRVTJvDS+BQrWj+7IV/fYAQVTR+Z2eyakAGpNVfe4YfxYU5m6vyZd4ONyblodhul5POGA2lc6g/oPXGkcAKezUoWBSZdQHWb3hnzNg/j1UgMlyNFDzGyNmP03x2uoddCVBa0=; Original-Received: from [82.169.182.84] by web26905.mail.ukl.yahoo.com via HTTP; Sun, 22 Jun 2008 22:13:44 GMT X-Mailer: YahooMailWebService/0.7.199 X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6613 Archived-At: Hi, I'm sorry if the question has already been answered on the list but I could= n't find any reference to the topic in the archive (nor in guile user manua= l). I'm trying to use 'gh_new_procedure' to define a new procedure for Scheme t= hat refers to a c++ function. This function takes more than 0 arguments. Bu= t given that the gh_new_procedure is defined as taking a function with no a= rgument, g++ complains about the invalid conversion: main.cpp:131: error: invalid conversion from =E2=80=98scm_unused_struct* (*= )(scm_unused_struct*, scm_unused_struct*, scm_unused_struct*, scm_unused_st= ruct*, scm_unused_struct*)=E2=80=99 to =E2=80=98scm_unused_struct* (*)()=E2= =80=99 main.cpp:131: error: initializing argument 2 of =E2=80=98scm_unused_struc= t* gh_new_procedure(const char*, scm_unused_struct* (*)(), int, int, int)= =E2=80=99 (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 l= ike? Thanks a lot in advance for any reply! Gianluca =0A=0A=0A ___________________________________ =0AScopri il Blog di Yah= oo! Mail: trucchi, novit=C3=A0, consigli... e la tua opinione!=0Ahttp://www= .ymailblogit.com/blog/