mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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[] {
|
||||
|
||||
Reference in New Issue
Block a user