This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: feature request primitive-native-method
- From: Stan Pinte <stan at altosw dot be>
- To: Per Bothner <per at bothner dot com>
- Cc: wowa at jet dot msk dot su, kawa at sources dot redhat dot com
- Date: Fri, 21 Mar 2003 10:01:18 +0100
- Subject: Re: feature request primitive-native-method
- Organization: Alto Software
- References: <3E79DB1C.6050603@jet.msk.su><3E7A57B6.2070003@bothner.com>
On Thu, 20 Mar 2003 16:07:18 -0800
Per Bothner <per at bothner dot com> wrote:
> Vladimir Tsichevski wrote:
> > subject says it all. It would be convenient to call native methods from
> > Scheme without writing Java sources just to describe them.
>
> That's not possible. The 'native' attribute of a method
> is an attribute of its *implementation*, not its call.
> There is no way to express in bytecode *calling* native
> code.
>
> Note the existing primitive-xxx-method macros do not
> generate metyhod - they just generate *references* to
> method, that must already exist.
>
> What one could do is have some way to automatically
> generate a dummy Java class that has a native method,
> and perhaps at the same time generate the JNI wrapper
> that calls a C function. But that's a non-trivial
> task, starting with the design (which should ideally
> be compatible with existing Foreign Function Interfaces).
shouldn't we use something like swig for that?
http://www.swig.org/
> --
> --Per Bothner
> per at bothner dot com http://per.bothner.com/
>
>
>
--
Stanislas Pinte
Computer Consultant
98, rue Bois l'Evêque
B-4000 Liège
web: http://www.altosw.be
email: alto_stan at wanadoo dot be