stdlib/printing: remove ReplPrintable protocol

It is replaced by debugPrint() family of functions, that are called by REPL.

There is a regression in printing types that don't conform to Printable, this
is tracked by rdar://16898708


Swift SVN r18006
This commit is contained in:
Dmitri Hrybenko
2014-05-13 16:22:56 +00:00
parent 95168bb97c
commit de9a0c8ff0
24 changed files with 321 additions and 667 deletions

View File

@@ -17,8 +17,7 @@
struct CString :
_BuiltinExtendedGraphemeClusterLiteralConvertible,
ExtendedGraphemeClusterLiteralConvertible,
_BuiltinStringLiteralConvertible, StringLiteralConvertible,
ReplPrintable {
_BuiltinStringLiteralConvertible, StringLiteralConvertible {
var _bytesPtr : UnsafePointer<UInt8>
@transparent
@@ -55,17 +54,6 @@ struct CString :
return _bytesPtr.isNull()
}
func replPrint() {
print("\"")
var i = 0
while _bytesPtr[i] != 0 {
var c = UnicodeScalar(UInt32(_bytesPtr[i]))
print(c.escape())
i++
}
print("\"")
}
/// \brief From a CString with possibly-transient lifetime, create a
/// nul-terminated array of 'C' char.
func persist() -> CChar[] {