From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Linas Vepstas Newsgroups: gmane.lisp.guile.user Subject: Re: Guile, C++, and Mac OS X 10.4 (powerpc) Date: Thu, 29 Jul 2010 07:43:09 -0500 Message-ID: References: <501CC8FC-0348-4E6D-87D7-67AD82CD45B1@telia.com> Reply-To: linasvepstas@gmail.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1280407432 18688 80.91.229.12 (29 Jul 2010 12:43:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 29 Jul 2010 12:43:52 +0000 (UTC) Cc: guile-user@gnu.org To: Mike Solomon Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Jul 29 14:43:50 2010 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.69) (envelope-from ) id 1OeSSc-0000ha-S6 for guile-user@m.gmane.org; Thu, 29 Jul 2010 14:43:49 +0200 Original-Received: from localhost ([127.0.0.1]:36502 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OeSSY-0007ve-Du for guile-user@m.gmane.org; Thu, 29 Jul 2010 08:43:38 -0400 Original-Received: from [140.186.70.92] (port=51041 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OeSSS-0007vZ-7D for guile-user@gnu.org; Thu, 29 Jul 2010 08:43:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OeSSQ-0000bb-Gw for guile-user@gnu.org; Thu, 29 Jul 2010 08:43:31 -0400 Original-Received: from mail-ey0-f169.google.com ([209.85.215.169]:64699) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OeSSQ-0000bO-5W for guile-user@gnu.org; Thu, 29 Jul 2010 08:43:30 -0400 Original-Received: by eydd26 with SMTP id d26so82638eyd.0 for ; Thu, 29 Jul 2010 05:43:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:reply-to :in-reply-to:references:from:date:message-id:subject:to:cc :content-type; bh=lpJ+iMNxWbwPO7DF0QokXTVpu1LQZ3up5UYPiF7rv2I=; b=jx7fGeMsK3YyfQwr4reqhutpbIuhNElQ2cdC2S66raYCcwFVjv8FiWYTHPjY7OEiG6 pIsuN2yAQjr9ovYOLDq/jJAJbYIarnMJpQTikDJQAmtCYTQ3Pd5WZO1uiMWF7TtE3mCd Nhj0KwIsulsOPShrbNFMl1tvJp6+83B9+HkOU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; b=Mbj0Pb58GE7qr3Hwjy1AZo2FtJTn5oE/3iOOsLnp5ZNoA0d5R5znZmfOCcHpaAHniG y8e0c+RmdBsrVSSWDp8BC1pW6rZvX3lPlKLYKsRAXusM7ragSiyx68rv4LlqCBKvB8XE I3SK4mo+9K+VF3Zt4XHaunCL7o0d0yyCT+Wmo= Original-Received: by 10.213.28.194 with SMTP id n2mr7135929ebc.10.1280407409133; Thu, 29 Jul 2010 05:43:29 -0700 (PDT) Original-Received: by 10.213.34.134 with HTTP; Thu, 29 Jul 2010 05:43:09 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:8029 Archived-At: On 29 July 2010 03:04, Mike Solomon wrote: > > Hope this helps the fledgling C++ programmer using guile! If anyone is interested, I have a C++ template class that is analogous to scm_c_define_gsubr for object methods (and calls scm_c_define_gsubr under the covers) One just says: MyTestClass *mtc = new MyTestClass(42); define_scheme_primitive("bingo", &MyTestClass::my_func, mtc); and a corresponding scheme function, with appropriate signature and argument conversion, gets created. --linas