This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libjava status on Solaris 8/Intel and IRIX 6.5


Tom Tromey writes:
 > >>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
 > 
 > >> void barf (java::lang::grope *poo)
 > >> {
 > >> ref<java::lang::grope> no_really = poo;
 > >> 
 > >> ... hope you don't use `poo' by mistake in here, since it will
 > >> silently "work" ...
 > >> 
 > >> }
 > 
 > Andrew> I don't understand.  Why won't using a smart pointer as the
 > Andrew> arg work?
 > 
 > If this is a method, which most CNI code is, then the name of the
 > method must mangle in a way compatible with gcj.  I guess we could
 > change the gcj mangling algorithm.

Well yes, absolutely.  I'm suggesting migrating CNI from C-style
pointers to a C++ smart pointer type like ref<T>.  Surely that's the
right thing to do in the long term.

I suppose an alternative in the meantime is some sort of macro magic
that generated both the headers for a function -- with weird names for
the actual args -- and the code to copy from the args to the more
sensibly named smart pointers that are used in the function.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]