This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ and Java CNI: Check Java references
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: C++ and Java CNI: Check Java references
- From: Andrew Haley <aph at cambridge dot redhat dot com>
- Date: Tue, 24 Apr 2001 19:23:04 +0100 (BST)
- Cc: per at bothner dot com, java at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- References: <m28zkrza8h.fsf@kelso.bothner.com><20010424111601I.mitchell@codesourcery.com>
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.