C++ and Java CNI: Check Java references
Andrew Haley
aph@cambridge.redhat.com
Tue Apr 24 11:23:00 GMT 2001
Mark Mitchell writes:
> >>>>> "Per" == Per Bothner <per@bothner.com> writes:
>
> Per> from the source. However, explicit null-pointer checking
> Per> seems to stretch the boundary of appropriate magic re-writes.
>
> FWIW, I agree with Per. I would prefer not to see this patch
> installed.
>
> Instead, I would suggest that CNI programmers use C++ features, i.e.,
> smart pointers, to do the job.
I can see the logic here, but doesn't it amount to a redesign of CNI?
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.
Andrew.
More information about the Java
mailing list