Patch for Review: JvGetStringUTF and JvTempCString
Mohan Embar
gnustuff@thisiscool.com
Tue Aug 12 15:33:00 GMT 2003
>>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/
More information about the Java-patches
mailing list