String.java (String): New constructor.
* java/lang/String.java (String): New constructor. * gnu/gcj/runtime/natStringBuffer.cc: New file. * gnu/gcj/runtime/StringBuffer.java: New file. * Makefile.in: Rebuilt. * Makefile.am (ordinary_java_source_files): Added gnu/gcj/runtime/StringBuffer.java. (nat_source_files): Added gnu/gcj/runtime/natStringBuffer.cc. From-SVN: r47883
This commit is contained in:
parent
34026199b3
commit
50cc5dd29b
6 changed files with 253 additions and 2 deletions
|
@ -92,6 +92,16 @@ public final class String implements Serializable, Comparable, CharSequence
|
|||
}
|
||||
}
|
||||
|
||||
// This is used by gnu.gcj.runtime.StringBuffer, so it must have
|
||||
// package-private protection. It is accessed via CNI and so avoids
|
||||
// ordinary protection mechanisms.
|
||||
String (gnu.gcj.runtime.StringBuffer buffer)
|
||||
{
|
||||
// No need to synchronize or mark the buffer, since we know it is
|
||||
// only used once.
|
||||
init (buffer.value, 0, buffer.count, true);
|
||||
}
|
||||
|
||||
public String (char[] data)
|
||||
{
|
||||
init(data, 0, data.length, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue