[Top][All Lists]

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

Re: one C function to many Scheme functions

From: Matthias Koeppe
Subject: Re: one C function to many Scheme functions
Date: Thu, 09 Jan 2003 12:40:43 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.80 (sparc-sun-solaris2.7)

Neil Jerram <address@hidden> writes:

>>>>>> "bajcik" == bajcik  <address@hidden> writes:
>     bajcik> But I want to declare many functions in a loop. I have a
>     bajcik> table of names and a table of C-functions [ mytype_t
>     bajcik> function(my_type arg) ] and only ONE C-function that
>     bajcik> converts SCM to mytype_t. It is a wrapper.
> Guile does not have anything like gh_new_procedure_data.  

What about applicable smobs?  The OP could make a new smob type for
"1-argument C closures".  The smob's APPLY function would call the
"wrapper" function, where the "void *data" would be fed from
SCM_SMOB_DATA.  (I think this requires a recent Guile (1.6).)

Matthias Köppe --

reply via email to

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