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: Mohan Embar <gnustuff at thisiscool dot com>
- To: Bryce McKinlay <bryce at mckinlay dot net dot nz>
- Cc: tromey at redhat dot com, java-patches at gcc dot gnu dot org
- Date: Tue, 12 Aug 2003 10:14:14 -0500
- Subject: Re: Patch for Review: JvGetStringUTF and JvTempCString
- Reply-to: gnustuff at thisiscool dot com
>>I totally agree that we have a problem here, I just wonder if this is
>>the right solution. Two things that would make me like this better:
>>
>>1. Can it be made to allocate only the space that it needs on the
>>stack?
>
>How? (The only way I can think of doing this in one line is with a macro.)
#define JV_TEMP_UTF_STRING(jstr, buf) \
char* buf = __builtin_alloca (JvGetStringUTFLength (jstr) + 1); \
JvGetStringUTFChars(jstr, buf);
Not sure how I feel about this.
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/