| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2006, 2008, 2009, 2010, 2012 Apple Inc. All rights | 2 * Copyright (C) 2003, 2006, 2008, 2009, 2010, 2012 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #ifndef CString_h | 27 #ifndef CString_h |
| 28 #define CString_h | 28 #define CString_h |
| 29 | 29 |
| 30 #include "wtf/Allocator.h" | 30 #include "wtf/Allocator.h" |
| 31 #include "wtf/RefCounted.h" | 31 #include "wtf/RefCounted.h" |
| 32 #include "wtf/RefPtr.h" | 32 #include "wtf/RefPtr.h" |
| 33 #include "wtf/WTFExport.h" | 33 #include "wtf/WTFExport.h" |
| 34 #include "wtf/allocator/PartitionAllocator.h" |
| 34 #include <string.h> | 35 #include <string.h> |
| 35 | 36 |
| 36 namespace WTF { | 37 namespace WTF { |
| 37 | 38 |
| 38 // CStringImpl is an immutable ref-counted storage for the characters in a | 39 // CStringImpl is an immutable ref-counted storage for the characters in a |
| 39 // CString. It's analogous to a StringImpl but may contain any arbitrary | 40 // CString. It's analogous to a StringImpl but may contain any arbitrary |
| 40 // sequence of bytes. The data is always allocated 1 longer than length() and is | 41 // sequence of bytes. The data is always allocated 1 longer than length() and is |
| 41 // null terminated. | 42 // null terminated. |
| 42 class WTF_EXPORT CStringImpl : public RefCounted<CStringImpl> { | 43 class WTF_EXPORT CStringImpl : public RefCounted<CStringImpl> { |
| 43 WTF_MAKE_NONCOPYABLE(CStringImpl); | 44 WTF_MAKE_NONCOPYABLE(CStringImpl); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 109 |
| 109 // Pretty printer for gtest and base/logging.*. It prepends and appends | 110 // Pretty printer for gtest and base/logging.*. It prepends and appends |
| 110 // double-quotes, and escapes characters other than ASCII printables. | 111 // double-quotes, and escapes characters other than ASCII printables. |
| 111 WTF_EXPORT std::ostream& operator<<(std::ostream&, const CString&); | 112 WTF_EXPORT std::ostream& operator<<(std::ostream&, const CString&); |
| 112 | 113 |
| 113 } // namespace WTF | 114 } // namespace WTF |
| 114 | 115 |
| 115 using WTF::CString; | 116 using WTF::CString; |
| 116 | 117 |
| 117 #endif // CString_h | 118 #endif // CString_h |
| OLD | NEW |