feature request primitive-native-method

Stan Pinte stan@altosw.be
Fri Mar 21 08:28:00 GMT 2003


On Thu, 20 Mar 2003 16:07:18 -0800
Per Bothner <per@bothner.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@bothner.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@wanadoo.be



More information about the Kawa mailing list