This is the mail archive of the java@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: Question on String merge


>>>>> "Eric" == Eric Blake <ebb9@email.byu.edu> writes:

Eric> I'm trying to merge some of my recent changes to String and
Eric> StringBuffer from Classpath into gcj.

I still haven't looked at your patch ...

Eric> Now that both String and Character use gnu.java.lang.CharData in
Eric> Classpath, I'm trying to figure out how to represent that in
Eric> C-style arrays in the native code of gcj.  I don't want the
Eric> static data to be defined twice, but I also don't want to
Eric> pollute the namespace.

Eric> +#ifndef CHARTABLES_DEFINE
Eric> +extern const jchar blocks[];
Eric> +#else
Eric>  static const jchar blocks[] = {

I don't think this will do what you want.

Instead, rename the array to something like _Jv_char_data_block (you
pick the name -- the prefix is all that is important).  Then put a
decl for the array into jvm.h or some place like that.  Finally, only
include the header with the table in one file.

Tom


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