"Keith" == Keith Seitz <keiths@redhat.com> writes:
Please guys, remember the JNICALLs! They're not necessary for Linux
but at least minGW needs them...
Keith> Ugh, you know, and I really WAS being careful about that... I
Keith> double-checked that all my functions did that -- all the JVMTI ones,
Keith> at least. Sigh.
Yeah, it can be hard to remember this when developing on Linux.
Yesterday I was wondering whether there is some way we could define
JNICALL on Linux so that we would catch this error, say some harmless
attribute. But, that is probably a bad idea since JNICALL is public.
Another idea would be to use a token-pasting "DEFUN" macro and let it
do the work:
#define DEFUN(blahblah) static jvmtiError JNICALL \
_Jv_JVMTI_ ## Name blahblah
...
DEFUN(SuspendThread, (...)) { ... }
But of course this is still susceptible to the problem if you forget
to use the macro.