This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: calling kawa functions from java (FFI)


"Mato Mira, Fernando" <Fernando.Matomira@dialog.com> writes:

>   How does one call kawa functions from Java? That is, not using
> Scheme.eval. I have some
> Scheme objects stored in Java variables that I need to pass to the function.

You have to use Scheme.eval once, like this:

import gnu.mapping.*;
Procedure request_handler = (Procedure) interp.eval(handler_name);

Then, use the appropriate method from gnu/mapping/Procedure.java as many
times as you wish, e.g. for a two-argument function:

request_handler.apply2(obj1, obj2)


-- 
<brlewis@[(if (brl-related? message)    ; Bruce R. Lewis
              "users.sourceforge.net"   ; http://brl.codesimply.net/
              "alum.mit.edu")]>


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