This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: New version of "UTF-16 to 'Win32 locale' conversions" and filenames (replacing convertion tables with Win32 API calls)
- From: Andrew Haley <aph at redhat dot com>
- To: Mohan Embar <gnustuff at thisiscool dot com>
- Cc: Bryce McKinlay <bryce at mckinlay dot net dot nz>, João Garcia <jgarcia at uk2 dot net>, java-patches at gcc dot gnu dot org
- Date: Fri, 19 Sep 2003 15:37:19 +0100
- Subject: Re: Patch: New version of "UTF-16 to 'Win32 locale' conversions" and filenames (replacing convertion tables with Win32 API calls)
- References: <16235.4579.735547.873303@cuddles.cambridge.redhat.com><WQPOLSPA8ON412Y5Z2Y03WD0LJJFIH.3f6b1374@p733>
Mohan Embar writes:
> >
> >To what extent is this really worth worrying about? Make it work
> >first, optimize later.
>
> We're talking a C++ interface with two braindead implementations: one which
> reads really nicely because it's essentially a passthrough, and another more
> slightly convoluted one which we can eventually throw out. This seems
> like a worthwhile investment to me.
Perhaps.
> > > SWT simply implements one-to-one Java wrappers around the
> > > corresponding OS call.
> >
> >Yes it does, and having done a lot of work on SWT I'm not convinced
> >it's a model to follow.
>
> Could you elaborate on this more?
The problem is that SWT maps *foo onto int. So, many Java methods are
passed ints, but there's no type checking -- all that you know is
you're passed a pointer to something, and you pass that to a native
method. All the type checking we've grown to love has gone.
Andrew.