[kaffe] [bug] kaffeh can't handle overloaded native methods
Dalibor Topic
robilad at yahoo.com
Fri Dec 27 15:00:14 PST 2002
Hi,
I'm trying to teach kaffeh to handle overloaded native
methods in -jni
mode. Run it on JavahTest.class and compare the result
to
JavahTest.h.jdk13. You'll see that kaffeh declares two
functions with
same name but with different argument lists, which is
illegal in C.
According to page 152 of the JNI Programmer's Guide
and Specification
by Sheng Liang overloaded Java native methods names
are converted to C
function names by adding "__" and the encoded argument
list. My patch
tries to fix that, but unfortunately I don't seem to
be able to access
an initialized CLASS_METHODS structure in order to
check for duplicate
methods.
So I'd be glad if someone with more kaffeh hacking
experience could
take a closer look at it and tell me if I'm missing
something
obvious. As a bit of background motivation, this is
the last bit
holding back the merge of the ALSA based sound backend
from
tritonus.org.
Attached you'll find the patch, an initial changelog
entry, a test
class and output from kaffeh -jni and javah -jni from
JDK 1.3.
best regards,
dalibor topic
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kaffeh-overloaded-native-naming.tar.gz
Type: application/x-gzip-compressed
Size: 2191 bytes
Desc: kaffeh-overloaded-native-naming.tar.gz
Url : http://kaffe.org/pipermail/kaffe/attachments/20021227/3d5683c3/attachment-0003.bin
More information about the kaffe
mailing list