guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guile, C++, and Mac OS X 10.4 (powerpc)


From: Linas Vepstas
Subject: Re: Guile, C++, and Mac OS X 10.4 (powerpc)
Date: Thu, 29 Jul 2010 07:43:09 -0500

On 29 July 2010 03:04, Mike Solomon <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]