javaprims.h (_Jv_FormatInt): New declaration.

* gcj/javaprims.h (_Jv_FormatInt):  New declaration.
	* java/lang/natString.cc (_JvFormatInt):  New primitive, with logic
	taken from old Integer.toString code.
	(Integer::valueOf):  Use _Jv_FormatInt.
	* java/lang/Integer.java (toString):  Just use call String.valueOf.
	* java/lang/Long.java (toString):  Fix typo in comment.
	* java/lang/String.java (valueOf(int)):  Make native.
	* java/lang/StringBuffer.java (append(int)):  Make native.
	* java/lang/natStringBuffer.cc:  New file, for append(jint).
	* Makefile.am (ant_source_files):  Add java/lang/natStringBuffer.cc.

From-SVN: r42419
This commit is contained in:
Per Bothner 2001-05-21 21:38:37 -07:00 committed by Per Bothner
parent f5d6a24c2e
commit ef0a7b49a9
10 changed files with 98 additions and 40 deletions

View file

@ -319,10 +319,7 @@ public final class String implements Serializable, Comparable
public static native String valueOf (char c);
public static String valueOf (int i)
{
return Integer.toString(i);
}
public static native String valueOf (int i);
public static String valueOf (long l)
{