C++ and Java CNI: Check Java references
Richard Henderson
rth@redhat.com
Tue Apr 24 14:06:00 GMT 2001
On Tue, Apr 24, 2001 at 07:23:04PM +0100, Andrew Haley wrote:
> This:
>> jobjectArray
> java::io::File::performList (java::io::FilenameFilter *filter,
> java::io::FileFilter *fileFilter,
> java::lang::Class *result_type)
>> would become this:
>> jobjectArray
> java::io::File::performList (JavaPointer<java::io::FilenameFilter> filter,
> JavaPointer<java::io::FileFilter> fileFilter,
> JavaPointer<java::lang::Class> result_type)
>> Hmm. I guess it doesn't look too awful.
Actually, that changes the ABI, and imposes inefficiencies as well.
For instance, PowerPC passes all structures by invisible reference,
while pointers are passed directly.
You'd need to do the JavaPointer wrapping inside the functions.
r~
More information about the Java
mailing list