Question on String merge

Tom Tromey tromey@redhat.com
Thu Mar 14 11:00:00 GMT 2002


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



More information about the Java mailing list