diff src/share/vm/utilities/utf8.cpp @ 2177:3582bf76420e

6990754: Use native memory and reference counting to implement SymbolTable Summary: move symbols from permgen into C heap and reference count them Reviewed-by: never, acorn, jmasa, stefank
author coleenp
date Thu, 27 Jan 2011 16:11:27 -0800
parents f95d63e2154a
children 1d1603768966
line wrap: on
line diff
--- a/src/share/vm/utilities/utf8.cpp	Thu Jan 27 13:42:28 2011 -0800
+++ b/src/share/vm/utilities/utf8.cpp	Thu Jan 27 16:11:27 2011 -0800
@@ -164,7 +164,7 @@
 
 // Returns NULL if 'c' it not found. This only works as long
 // as 'c' is an ASCII character
-jbyte* UTF8::strrchr(jbyte* base, int length, jbyte c) {
+const jbyte* UTF8::strrchr(const jbyte* base, int length, jbyte c) {
   assert(length >= 0, "sanity check");
   assert(c >= 0, "does not work for non-ASCII characters");
   // Skip backwards in string until 'c' is found or end is reached
@@ -172,7 +172,7 @@
   return (length < 0) ? NULL : &base[length];
 }
 
-bool UTF8::equal(jbyte* base1, int length1, jbyte* base2, int length2) {
+bool UTF8::equal(const jbyte* base1, int length1, const jbyte* base2, int length2) {
   // Length must be the same
   if (length1 != length2) return false;
   for (int i = 0; i < length1; i++) {