This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch for Review: JvGetStringUTF and JvTempCString
- From: Tom Tromey <tromey at redhat dot com>
- To: Bryce McKinlay <bryce at mckinlay dot net dot nz>
- Cc: gnustuff at thisiscool dot com, java-patches at gcc dot gnu dot org
- Date: 11 Aug 2003 12:30:13 -0600
- Subject: Re: Patch for Review: JvGetStringUTF and JvTempCString
- References: <20EFD652-CB0E-11D7-B3B9-003065F97F7C@mckinlay.net.nz>
- Reply-to: tromey at redhat dot com
>>>>> "Bryce" == Bryce McKinlay <bryce@mckinlay.net.nz> writes:
Bryce> In this case (natFile*), I think there is a better
Bryce> approach. Since the path of a given File object never changes,
Bryce> we can cache the path in UTF format when each File object is
Bryce> constructed.
That makes sense.
However, I'd prefer to see the UTF data lazily computed. That way
there's minimal overhead in the (not uncommon) case where no low-level
operation is actually performed on the File.
So maybe Mohan's class isn't needed after all...
BTW we should probably use the default encoding, and not UTF, for file
names and the like. Your approach makes that simpler.
Tom