On Fri, 20 May 2005, Dan Sugalski wrote:
So, I see four real options:
1) Someone fixes the Eiffel interface generator to understand C variadic functions.
2) We provide a function and method call interface that assumes you've already pre-filled in the registers according to parrot's calling conventions
3) We build some sort of really simple call interface that takes an array PMC with the parameters stuffed into it
4) Parrot provides some sort of facility to autogenerate shim functions based on a passed-in signature
See http://java.sun.com/j2se/1.4.2/docs/guide/jni/spec/functions.html#wp4256
I think what's missing currently is the interface which takes the 'jvalue *' in the JNI interface; ie option #3 (if I understand you correctly).
In my implementation of the JNI (for the FLEX java compiler's runtime)
I implemented everything in terms of this 'MethodA' variant; the '...'
version easily packs up to a va_list, and then the va_list version needs to parse the method/sub's signature and generate an appropriate
array of PMCs which can be passed to the (canonical) 'MethodA' version.
--scott
AMTHUG Waco, Texas ODEARL overthrow assassinate Sabana Seca Albanian strategic Blair blowfish atomic AP GPFLOOR AVBUSY cryptographic pending
( http://cscott.net/ )