core/text: make FlatText private
authorAlexandre Terrasa <alexandre@moz-code.org>
Thu, 15 Oct 2015 17:39:03 +0000 (13:39 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Thu, 15 Oct 2015 17:39:03 +0000 (13:39 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

lib/core/text/abstract_text.nit
lib/core/text/flat.nit

index 01d0eab..baf8ae7 100644 (file)
@@ -966,14 +966,14 @@ abstract class Text
 end
 
 # All kinds of array-based text representations.
-abstract class FlatText
+private abstract class FlatText
        super Text
 
        # Underlying C-String (`char*`)
        #
        # Warning : Might be void in some subclasses, be sure to check
        # if set before using it.
-       private var items: NativeString is noinit
+       var items: NativeString is noinit
 
        # Returns a char* starting at position `first_byte`
        #
@@ -990,7 +990,7 @@ abstract class FlatText
        #
        # As always, do not modify the content of the String in C code, if this is what you want
        # copy locally the char* as Nit Strings are immutable.
-       private fun fast_cstring: NativeString is abstract
+       fun fast_cstring: NativeString is abstract
 
        redef var length = 0
 
index 5bc76fc..e8a2d4f 100644 (file)
@@ -36,18 +36,18 @@ end
 
 redef class FlatText
 
-       private fun first_byte: Int do return 0
+       fun first_byte: Int do return 0
 
-       private fun last_byte: Int do return _bytelen - 1
+       fun last_byte: Int do return _bytelen - 1
 
        # Cache of the latest position (char) explored in the string
-       private var position: Int = 0
+       var position: Int = 0
 
        # Cached position (bytes) in the NativeString underlying the String
-       private var bytepos: Int = 0
+       var bytepos: Int = 0
 
        # Index of the character `index` in `_items`
-       private fun char_to_byte_index(index: Int): Int do
+       fun char_to_byte_index(index: Int): Int do
                var ln = length
                assert index >= 0
                assert index < ln
@@ -90,7 +90,7 @@ redef class FlatText
        # This enables a double-optimization in `escape_to_c` since if this
        # method returns 0, then `self` does not need escaping and can be
        # returned as-is
-       protected fun chars_to_escape_to_c: Int do
+       fun chars_to_escape_to_c: Int do
                var its = _items
                var max = last_byte
                var pos = first_byte