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: feature request primitive-native-method


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).
--
	--Per Bothner
per at bothner dot com   http://per.bothner.com/



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