Casey Marshall wrote: > This is a better attempt at fixing the JCL_NewRawDataObject and > JCL_GetRawData, which initializes the cached class, method, and field > variables in JNI_OnLoad. > > This is potentially problematic, I suppose, because the jcl.lo object is > linked directly to a number of Classpath's JNI libraries, which I > suppose would mean that any such library couldn't have its own > JNI_OnLoad. None of them do now, however (this sounds like it may be > wrong, anyway: the JNI invocation interface docs seem to indicate that > you need to have this function in your JNI library, which returns the > JNI version you want to use, because otherwise the VM will assume you > will be using the 1.1 interface; IOW we're using it wrong if we use JNI > functions beyond 1.1. This sounds silly, though, and it works regardless). > > Comments on whether or not this will work are appreciated. > > 2006-09-09 Casey Marshall <[EMAIL PROTECTED]> > > * native/jni/classpath/jcl.c (JNI_OnLoad): new function. > (JCL_NewRawDataObject): use pre-initialized Pointer variables. > (JCL_GetRawData): likewise. >
Tested on Darwin/x86/jamvm, Linux/x86/cacao and Linux/x86/jamvm. Does this look OK to commit?
