[kaffe] libraries/clib/native/Field.c
Jukka Santala
jsantala@tml.hut.fi
Wed, 8 May 2002 12:32:49 +0300 (EEST)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
---559023410-684387517-1020850369=:4014
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Tue, 7 May 2002, Godmar Back wrote:
> Methods that start with Java_ are called using the JNI calling convention.
> See jni.c::Kaffe_JNI_native
Oops, I wasn't paying attention to the function names. In that case, the
question becomes whether those functions should use the JNI or straight
calling convention; PocketLinux uses JNI for them, which does make some
things easier... But I went with the flow and simply turned them into
straight calls as was originally intended. Also modified the exception to
match the form of Sun JDK, so that the earlier posted test-case passes.
Overall it doesn't appear JNI convention is used in many classes; are
there some specific constraints on choosing one over the other?
-Jukka Santala
---559023410-684387517-1020850369=:4014
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="Kaffe_Field_get.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.SOL.4.10.10205081232490.4014@morphine.tml.hut.fi>
Content-Description:
Content-Disposition: attachment; filename="Kaffe_Field_get.patch"
SW5kZXg6IGxpYnJhcmllcy9jbGliL25hdGl2ZS9DbGFzcy5jDQo9PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09DQpSQ1MgZmlsZTogL2N2cy9rYWZmZS9rYWZmZS9s
aWJyYXJpZXMvY2xpYi9uYXRpdmUvQ2xhc3MuYyx2DQpyZXRyaWV2aW5nIHJl
dmlzaW9uIDEuNjANCmRpZmYgLXUgLXIxLjYwIENsYXNzLmMNCi0tLSBsaWJy
YXJpZXMvY2xpYi9uYXRpdmUvQ2xhc3MuYwkxMiBBcHIgMjAwMiAyMToxMzo1
OSAtMDAwMAkxLjYwDQorKysgbGlicmFyaWVzL2NsaWIvbmF0aXZlL0NsYXNz
LmMJOCBNYXkgMjAwMiAwOToyMDo0MiAtMD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