This is the mail archive of the kawa@sourceware.org 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: Ateempt to rewrite a example from bytecode package on scheme


Yaroslav Kavenchuk wrote:
Example is attached

I get error at code
(*:getMethod helloWorldClass "add" argTypes)
Argument #3 ([Ljava.lang.Class;@54c4ad) to 'java.lang.Class.getMethod(java.lang.String,java.lang.Class[])' has
...
What is wrong? How to resolve problem?

The main problem was varargs handling. I think I fixed it so that is much better now (in SVN trunk).

A minor bug is that you used null instead of #!null.

A trickier issues is since the add method takes Java int
values, you need to pass java.lang.Integer values to
the Method:invoke call: That method knows to "unbox"
java.lang.Integer to int, but it doesn't handle
Scheme integers (which are gnu.math.IntNum).

I think this might be useful as both an example and
a test case.  Can I use it as such, including checking
it into the testsuite?
--
	--Per Bothner
per@bothner.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]