This is the mail archive of the java-patches@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: Patch for Review: JvGetStringUTF and JvTempCString


>>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/





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