This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How to create a new procedure type?


This question has gone unanswered for two days, and I, too, would like
to know the answer.  From what I grasped of Guile's pre-1.3 dynamic
loading support, callbacks could only take strings as args.  This
seemed to me rather silly, since the actual arguments are of course
going to be Scheme objects.  I guess you could sprintf(buf,"%ld",scm)
but you'd probably outsmart the gc by doing it.

Is there any way to make a C function of type SCM (*)(int nargs, SCM*
args) in a dynamically loaded module callable from Scheme?

Thanks
-John

> Date: Thu, 15 Apr 1999 12:44:05 GMT
> From: Jost Boekemeier <jostobfe@calvados.zrz.TU-Berlin.DE>
> 
> 
> Hi,
> 
> how do I create a new procedure type, somethinhg like
> `SCM (*callback)(SCM a, SCM b, SCM c)'?
> 
> 
> Jost
> 
>