Diff
Modified: trunk/Source/WTF/ChangeLog (230089 => 230090)
--- trunk/Source/WTF/ChangeLog 2018-03-30 01:24:00 UTC (rev 230089)
+++ trunk/Source/WTF/ChangeLog 2018-03-30 02:36:03 UTC (rev 230090)
@@ -1,3 +1,22 @@
+2018-03-29 JF Bastien <[email protected]>
+
+ Remove WTF_EXPORT_STRING_API
+ https://bugs.webkit.org/show_bug.cgi?id=184168
+ <rdar://problem/39023253>
+
+ Reviewed by Yusuke Suzuki.
+
+ Remove WTF_EXPORT_STRING_API as requested by a FIXME, and use
+ WTF_EXPORT_PRIVATE instead.
+
+ * wtf/ExportMacros.h:
+ * wtf/text/AtomicString.h:
+ * wtf/text/AtomicStringImpl.h:
+ * wtf/text/StringImpl.h:
+ * wtf/text/StringView.h:
+ * wtf/text/SymbolImpl.h:
+ * wtf/text/WTFString.h:
+
2018-03-29 Commit Queue <[email protected]>
Unreviewed, rolling out r230062.
Modified: trunk/Source/WTF/wtf/ExportMacros.h (230089 => 230090)
--- trunk/Source/WTF/wtf/ExportMacros.h 2018-03-30 01:24:00 UTC (rev 230089)
+++ trunk/Source/WTF/wtf/ExportMacros.h 2018-03-30 02:36:03 UTC (rev 230090)
@@ -88,6 +88,5 @@
#endif // USE(EXPORT_MACROS)
-// FIXME: We should replace WTF_EXPORTDATA and WTF_EXPORT_STRING_API with WTF_EXPORT_PRIVATE.
+// FIXME: We should replace WTF_EXPORTDATA and with WTF_EXPORT_PRIVATE.
#define WTF_EXPORTDATA WTF_EXPORT_PRIVATE
-#define WTF_EXPORT_STRING_API WTF_EXPORT_PRIVATE
Modified: trunk/Source/WTF/wtf/text/AtomicString.h (230089 => 230090)
--- trunk/Source/WTF/wtf/text/AtomicString.h 2018-03-30 01:24:00 UTC (rev 230089)
+++ trunk/Source/WTF/wtf/text/AtomicString.h 2018-03-30 02:36:03 UTC (rev 230090)
@@ -104,11 +104,11 @@
UChar operator[](unsigned int i) const { return m_string[i]; }
- WTF_EXPORT_STRING_API static AtomicString number(int);
- WTF_EXPORT_STRING_API static AtomicString number(unsigned);
- WTF_EXPORT_STRING_API static AtomicString number(unsigned long);
- WTF_EXPORT_STRING_API static AtomicString number(unsigned long long);
- WTF_EXPORT_STRING_API static AtomicString number(double);
+ WTF_EXPORT_PRIVATE static AtomicString number(int);
+ WTF_EXPORT_PRIVATE static AtomicString number(unsigned);
+ WTF_EXPORT_PRIVATE static AtomicString number(unsigned long);
+ WTF_EXPORT_PRIVATE static AtomicString number(unsigned long long);
+ WTF_EXPORT_PRIVATE static AtomicString number(double);
// If we need more overloads of the number function, we can add all the others that String has, but these seem to do for now.
bool contains(UChar character) const { return m_string.contains(character); }
@@ -133,8 +133,8 @@
bool endsWith(UChar character) const { return m_string.endsWith(character); }
template<unsigned matchLength> bool endsWith(const char (&prefix)[matchLength]) const { return m_string.endsWith<matchLength>(prefix); }
- WTF_EXPORT_STRING_API AtomicString convertToASCIILowercase() const;
- WTF_EXPORT_STRING_API AtomicString convertToASCIIUppercase() const;
+ WTF_EXPORT_PRIVATE AtomicString convertToASCIILowercase() const;
+ WTF_EXPORT_PRIVATE AtomicString convertToASCIIUppercase() const;
int toInt(bool* ok = 0) const { return m_string.toInt(ok); }
double toDouble(bool* ok = 0) const { return m_string.toDouble(ok); }
@@ -168,7 +168,7 @@
enum class CaseConvertType { Upper, Lower };
template<CaseConvertType> AtomicString convertASCIICase() const;
- WTF_EXPORT_STRING_API static AtomicString fromUTF8Internal(const char*, const char*);
+ WTF_EXPORT_PRIVATE static AtomicString fromUTF8Internal(const char*, const char*);
String m_string;
};
Modified: trunk/Source/WTF/wtf/text/AtomicStringImpl.h (230089 => 230090)
--- trunk/Source/WTF/wtf/text/AtomicStringImpl.h 2018-03-30 01:24:00 UTC (rev 230089)
+++ trunk/Source/WTF/wtf/text/AtomicStringImpl.h 2018-03-30 02:36:03 UTC (rev 230090)
@@ -29,8 +29,8 @@
class AtomicStringImpl : public UniquedStringImpl {
public:
- WTF_EXPORT_STRING_API static RefPtr<AtomicStringImpl> lookUp(const LChar*, unsigned length);
- WTF_EXPORT_STRING_API static RefPtr<AtomicStringImpl> lookUp(const UChar*, unsigned length);
+ WTF_EXPORT_PRIVATE static RefPtr<AtomicStringImpl> lookUp(const LChar*, unsigned length);
+ WTF_EXPORT_PRIVATE static RefPtr<AtomicStringImpl> lookUp(const UChar*, unsigned length);
static RefPtr<AtomicStringImpl> lookUp(StringImpl* string)
{
if (!string || string->isAtomic())
@@ -40,13 +40,13 @@
static void remove(AtomicStringImpl*);
- WTF_EXPORT_STRING_API static RefPtr<AtomicStringImpl> add(const LChar*);
+ WTF_EXPORT_PRIVATE static RefPtr<AtomicStringImpl> add(const LChar*);
ALWAYS_INLINE static RefPtr<AtomicStringImpl> add(const char* s) { return add(reinterpret_cast<const LChar*>(s)); };
- WTF_EXPORT_STRING_API static RefPtr<AtomicStringImpl> add(const LChar*, unsigned length);
- WTF_EXPORT_STRING_API static RefPtr<AtomicStringImpl> add(const UChar*, unsigned length);
+ WTF_EXPORT_PRIVATE static RefPtr<AtomicStringImpl> add(const LChar*, unsigned length);
+ WTF_EXPORT_PRIVATE static RefPtr<AtomicStringImpl> add(const UChar*, unsigned length);
ALWAYS_INLINE static RefPtr<AtomicStringImpl> add(const char* s, unsigned length) { return add(reinterpret_cast<const LChar*>(s), length); };
- WTF_EXPORT_STRING_API static RefPtr<AtomicStringImpl> add(const UChar*);
- WTF_EXPORT_STRING_API static RefPtr<AtomicStringImpl> add(StringImpl*, unsigned offset, unsigned length);
+ WTF_EXPORT_PRIVATE static RefPtr<AtomicStringImpl> add(const UChar*);
+ WTF_EXPORT_PRIVATE static RefPtr<AtomicStringImpl> add(StringImpl*, unsigned offset, unsigned length);
ALWAYS_INLINE static RefPtr<AtomicStringImpl> add(StringImpl* string)
{
if (!string)
@@ -53,13 +53,13 @@
return static_cast<AtomicStringImpl*>(string);
return add(*string);
}
- WTF_EXPORT_STRING_API static RefPtr<AtomicStringImpl> add(const StaticStringImpl*);
- WTF_EXPORT_STRING_API static Ref<AtomicStringImpl> addLiteral(const char* characters, unsigned length);
+ WTF_EXPORT_PRIVATE static RefPtr<AtomicStringImpl> add(const StaticStringImpl*);
+ WTF_EXPORT_PRIVATE static Ref<AtomicStringImpl> addLiteral(const char* characters, unsigned length);
// Returns null if the input data contains an invalid UTF-8 sequence.
- WTF_EXPORT_STRING_API static RefPtr<AtomicStringImpl> addUTF8(const char* start, const char* end);
+ WTF_EXPORT_PRIVATE static RefPtr<AtomicStringImpl> addUTF8(const char* start, const char* end);
#if USE(CF)
- WTF_EXPORT_STRING_API static RefPtr<AtomicStringImpl> add(CFStringRef);
+ WTF_EXPORT_PRIVATE static RefPtr<AtomicStringImpl> add(CFStringRef);
#endif
template<typename StringTableProvider>
@@ -71,7 +71,7 @@
}
#if !ASSERT_DISABLED
- WTF_EXPORT_STRING_API static bool isInAtomicStringTable(StringImpl*);
+ WTF_EXPORT_PRIVATE static bool isInAtomicStringTable(StringImpl*);
#endif
private:
@@ -95,10 +95,10 @@
return addSlowCase(stringTable, string);
}
- WTF_EXPORT_STRING_API static Ref<AtomicStringImpl> addSlowCase(StringImpl&);
- WTF_EXPORT_STRING_API static Ref<AtomicStringImpl> addSlowCase(AtomicStringTable&, StringImpl&);
+ WTF_EXPORT_PRIVATE static Ref<AtomicStringImpl> addSlowCase(StringImpl&);
+ WTF_EXPORT_PRIVATE static Ref<AtomicStringImpl> addSlowCase(AtomicStringTable&, StringImpl&);
- WTF_EXPORT_STRING_API static RefPtr<AtomicStringImpl> lookUpSlowCase(StringImpl&);
+ WTF_EXPORT_PRIVATE static RefPtr<AtomicStringImpl> lookUpSlowCase(StringImpl&);
};
#if !ASSERT_DISABLED
Modified: trunk/Source/WTF/wtf/text/StringImpl.h (230089 => 230090)
--- trunk/Source/WTF/wtf/text/StringImpl.h 2018-03-30 01:24:00 UTC (rev 230089)
+++ trunk/Source/WTF/wtf/text/StringImpl.h 2018-03-30 02:36:03 UTC (rev 230090)
@@ -218,16 +218,16 @@
StringImpl(const UChar*, unsigned length, Ref<StringImpl>&&);
public:
- WTF_EXPORT_STRING_API static void destroy(StringImpl*);
+ WTF_EXPORT_PRIVATE static void destroy(StringImpl*);
- WTF_EXPORT_STRING_API static Ref<StringImpl> create(const UChar*, unsigned length);
- WTF_EXPORT_STRING_API static Ref<StringImpl> create(const LChar*, unsigned length);
- WTF_EXPORT_STRING_API static Ref<StringImpl> create8BitIfPossible(const UChar*, unsigned length);
+ WTF_EXPORT_PRIVATE static Ref<StringImpl> create(const UChar*, unsigned length);
+ WTF_EXPORT_PRIVATE static Ref<StringImpl> create(const LChar*, unsigned length);
+ WTF_EXPORT_PRIVATE static Ref<StringImpl> create8BitIfPossible(const UChar*, unsigned length);
template<size_t inlineCapacity> static Ref<StringImpl> create8BitIfPossible(const Vector<UChar, inlineCapacity>&);
- WTF_EXPORT_STRING_API static Ref<StringImpl> create8BitIfPossible(const UChar*);
+ WTF_EXPORT_PRIVATE static Ref<StringImpl> create8BitIfPossible(const UChar*);
ALWAYS_INLINE static Ref<StringImpl> create(const char* characters, unsigned length) { return create(reinterpret_cast<const LChar*>(characters), length); }
- WTF_EXPORT_STRING_API static Ref<StringImpl> create(const LChar*);
+ WTF_EXPORT_PRIVATE static Ref<StringImpl> create(const LChar*);
ALWAYS_INLINE static Ref<StringImpl> create(const char* string) { return create(reinterpret_cast<const LChar*>(string)); }
static Ref<StringImpl> createSubstringSharingImpl(StringImpl&, unsigned offset, unsigned length);
@@ -235,13 +235,13 @@
template<unsigned characterCount> static Ref<StringImpl> createFromLiteral(const char (&)[characterCount]);
// FIXME: Replace calls to these overloads of createFromLiteral to createWithoutCopying instead.
- WTF_EXPORT_STRING_API static Ref<StringImpl> createFromLiteral(const char*, unsigned length);
- WTF_EXPORT_STRING_API static Ref<StringImpl> createFromLiteral(const char*);
+ WTF_EXPORT_PRIVATE static Ref<StringImpl> createFromLiteral(const char*, unsigned length);
+ WTF_EXPORT_PRIVATE static Ref<StringImpl> createFromLiteral(const char*);
- WTF_EXPORT_STRING_API static Ref<StringImpl> createWithoutCopying(const UChar*, unsigned length);
- WTF_EXPORT_STRING_API static Ref<StringImpl> createWithoutCopying(const LChar*, unsigned length);
- WTF_EXPORT_STRING_API static Ref<StringImpl> createUninitialized(unsigned length, LChar*&);
- WTF_EXPORT_STRING_API static Ref<StringImpl> createUninitialized(unsigned length, UChar*&);
+ WTF_EXPORT_PRIVATE static Ref<StringImpl> createWithoutCopying(const UChar*, unsigned length);
+ WTF_EXPORT_PRIVATE static Ref<StringImpl> createWithoutCopying(const LChar*, unsigned length);
+ WTF_EXPORT_PRIVATE static Ref<StringImpl> createUninitialized(unsigned length, LChar*&);
+ WTF_EXPORT_PRIVATE static Ref<StringImpl> createUninitialized(unsigned length, UChar*&);
template<typename CharacterType> static RefPtr<StringImpl> tryCreateUninitialized(unsigned length, CharacterType*&);
// Reallocate the StringImpl. The originalString must be only owned by the Ref,
@@ -261,8 +261,8 @@
template<typename CharacterType, size_t inlineCapacity, typename OverflowHandler, size_t minCapacity>
static Ref<StringImpl> adopt(StringVector<CharacterType, inlineCapacity, OverflowHandler, minCapacity>&&);
- WTF_EXPORT_STRING_API static Ref<StringImpl> adopt(StringBuffer<UChar>&&);
- WTF_EXPORT_STRING_API static Ref<StringImpl> adopt(StringBuffer<LChar>&&);
+ WTF_EXPORT_PRIVATE static Ref<StringImpl> adopt(StringBuffer<UChar>&&);
+ WTF_EXPORT_PRIVATE static Ref<StringImpl> adopt(StringBuffer<LChar>&&);
unsigned length() const { return m_length; }
unsigned mask() const { return m_mask; }
@@ -278,7 +278,7 @@
size_t cost() const;
size_t costDuringGC();
- WTF_EXPORT_STRING_API size_t sizeInBytes() const;
+ WTF_EXPORT_PRIVATE size_t sizeInBytes() const;
bool isSymbol() const { return m_hashAndFlags & s_hashFlagStringKindIsSymbol; }
bool isAtomic() const { return m_hashAndFlags & s_hashFlagStringKindIsAtomic; }
@@ -288,13 +288,13 @@
bool isSubString() const { return bufferOwnership() == BufferSubstring; }
#endif
- static WTF_EXPORT_STRING_API CString utf8ForCharacters(const LChar* characters, unsigned length);
- static WTF_EXPORT_STRING_API CString utf8ForCharacters(const UChar* characters, unsigned length, ConversionMode = LenientConversion);
- WTF_EXPORT_STRING_API CString utf8ForRange(unsigned offset, unsigned length, ConversionMode = LenientConversion) const;
- WTF_EXPORT_STRING_API CString utf8(ConversionMode = LenientConversion) const;
+ static WTF_EXPORT_PRIVATE CString utf8ForCharacters(const LChar* characters, unsigned length);
+ static WTF_EXPORT_PRIVATE CString utf8ForCharacters(const UChar* characters, unsigned length, ConversionMode = LenientConversion);
+ WTF_EXPORT_PRIVATE CString utf8ForRange(unsigned offset, unsigned length, ConversionMode = LenientConversion) const;
+ WTF_EXPORT_PRIVATE CString utf8(ConversionMode = LenientConversion) const;
private:
- static WTF_EXPORT_STRING_API bool utf8Impl(const UChar* characters, unsigned length, char*& buffer, size_t bufferSize, ConversionMode);
+ static WTF_EXPORT_PRIVATE bool utf8Impl(const UChar* characters, unsigned length, char*& buffer, size_t bufferSize, ConversionMode);
// The high bits of 'hash' are always empty, but we prefer to store our flags
// in the low bits because it makes them slightly more efficient to access.
@@ -370,11 +370,11 @@
// its own copy of the string.
Ref<StringImpl> isolatedCopy() const;
- WTF_EXPORT_STRING_API Ref<StringImpl> substring(unsigned position, unsigned length = std::numeric_limits<unsigned>::max());
+ WTF_EXPORT_PRIVATE Ref<StringImpl> substring(unsigned position, unsigned length = std::numeric_limits<unsigned>::max());
UChar at(unsigned) const;
UChar operator[](unsigned i) const { return at(i); }
- WTF_EXPORT_STRING_API UChar32 characterStartingAt(unsigned);
+ WTF_EXPORT_PRIVATE UChar32 characterStartingAt(unsigned);
int toIntStrict(bool* ok = 0, int base = 10);
unsigned toUIntStrict(bool* ok = 0, int base = 10);
@@ -382,7 +382,7 @@
uint64_t toUInt64Strict(bool* ok = 0, int base = 10);
intptr_t toIntPtrStrict(bool* ok = 0, int base = 10);
- WTF_EXPORT_STRING_API int toInt(bool* ok = 0); // ignores trailing garbage
+ WTF_EXPORT_PRIVATE int toInt(bool* ok = 0); // ignores trailing garbage
unsigned toUInt(bool* ok = 0); // ignores trailing garbage
int64_t toInt64(bool* ok = 0); // ignores trailing garbage
uint64_t toUInt64(bool* ok = 0); // ignores trailing garbage
@@ -394,18 +394,18 @@
double toDouble(bool* ok = 0);
float toFloat(bool* ok = 0);
- WTF_EXPORT_STRING_API Ref<StringImpl> convertToASCIILowercase();
- WTF_EXPORT_STRING_API Ref<StringImpl> convertToASCIIUppercase();
- WTF_EXPORT_STRING_API Ref<StringImpl> convertToLowercaseWithoutLocale();
- WTF_EXPORT_STRING_API Ref<StringImpl> convertToLowercaseWithoutLocaleStartingAtFailingIndex8Bit(unsigned);
- WTF_EXPORT_STRING_API Ref<StringImpl> convertToUppercaseWithoutLocale();
- WTF_EXPORT_STRING_API Ref<StringImpl> convertToLowercaseWithLocale(const AtomicString& localeIdentifier);
- WTF_EXPORT_STRING_API Ref<StringImpl> convertToUppercaseWithLocale(const AtomicString& localeIdentifier);
+ WTF_EXPORT_PRIVATE Ref<StringImpl> convertToASCIILowercase();
+ WTF_EXPORT_PRIVATE Ref<StringImpl> convertToASCIIUppercase();
+ WTF_EXPORT_PRIVATE Ref<StringImpl> convertToLowercaseWithoutLocale();
+ WTF_EXPORT_PRIVATE Ref<StringImpl> convertToLowercaseWithoutLocaleStartingAtFailingIndex8Bit(unsigned);
+ WTF_EXPORT_PRIVATE Ref<StringImpl> convertToUppercaseWithoutLocale();
+ WTF_EXPORT_PRIVATE Ref<StringImpl> convertToLowercaseWithLocale(const AtomicString& localeIdentifier);
+ WTF_EXPORT_PRIVATE Ref<StringImpl> convertToUppercaseWithLocale(const AtomicString& localeIdentifier);
Ref<StringImpl> foldCase();
Ref<StringImpl> stripWhiteSpace();
- WTF_EXPORT_STRING_API Ref<StringImpl> simplifyWhiteSpace();
+ WTF_EXPORT_PRIVATE Ref<StringImpl> simplifyWhiteSpace();
Ref<StringImpl> simplifyWhiteSpace(CodeUnitMatchFunction);
Ref<StringImpl> stripLeadingAndTrailingCharacters(CodeUnitMatchFunction);
@@ -418,46 +418,46 @@
size_t find(LChar character, unsigned start = 0);
size_t find(char character, unsigned start = 0);
size_t find(UChar character, unsigned start = 0);
- WTF_EXPORT_STRING_API size_t find(CodeUnitMatchFunction, unsigned index = 0);
+ WTF_EXPORT_PRIVATE size_t find(CodeUnitMatchFunction, unsigned index = 0);
size_t find(const LChar*, unsigned index = 0);
ALWAYS_INLINE size_t find(const char* string, unsigned index = 0) { return find(reinterpret_cast<const LChar*>(string), index); }
- WTF_EXPORT_STRING_API size_t find(StringImpl*);
- WTF_EXPORT_STRING_API size_t find(StringImpl*, unsigned index);
- WTF_EXPORT_STRING_API size_t findIgnoringASCIICase(const StringImpl&) const;
- WTF_EXPORT_STRING_API size_t findIgnoringASCIICase(const StringImpl&, unsigned startOffset) const;
- WTF_EXPORT_STRING_API size_t findIgnoringASCIICase(const StringImpl*) const;
- WTF_EXPORT_STRING_API size_t findIgnoringASCIICase(const StringImpl*, unsigned startOffset) const;
+ WTF_EXPORT_PRIVATE size_t find(StringImpl*);
+ WTF_EXPORT_PRIVATE size_t find(StringImpl*, unsigned index);
+ WTF_EXPORT_PRIVATE size_t findIgnoringASCIICase(const StringImpl&) const;
+ WTF_EXPORT_PRIVATE size_t findIgnoringASCIICase(const StringImpl&, unsigned startOffset) const;
+ WTF_EXPORT_PRIVATE size_t findIgnoringASCIICase(const StringImpl*) const;
+ WTF_EXPORT_PRIVATE size_t findIgnoringASCIICase(const StringImpl*, unsigned startOffset) const;
- WTF_EXPORT_STRING_API size_t reverseFind(UChar, unsigned index = std::numeric_limits<unsigned>::max());
- WTF_EXPORT_STRING_API size_t reverseFind(StringImpl*, unsigned index = std::numeric_limits<unsigned>::max());
+ WTF_EXPORT_PRIVATE size_t reverseFind(UChar, unsigned index = std::numeric_limits<unsigned>::max());
+ WTF_EXPORT_PRIVATE size_t reverseFind(StringImpl*, unsigned index = std::numeric_limits<unsigned>::max());
- WTF_EXPORT_STRING_API bool startsWith(const StringImpl*) const;
- WTF_EXPORT_STRING_API bool startsWith(const StringImpl&) const;
- WTF_EXPORT_STRING_API bool startsWithIgnoringASCIICase(const StringImpl*) const;
- WTF_EXPORT_STRING_API bool startsWithIgnoringASCIICase(const StringImpl&) const;
- WTF_EXPORT_STRING_API bool startsWith(UChar) const;
- WTF_EXPORT_STRING_API bool startsWith(const char*, unsigned matchLength) const;
+ WTF_EXPORT_PRIVATE bool startsWith(const StringImpl*) const;
+ WTF_EXPORT_PRIVATE bool startsWith(const StringImpl&) const;
+ WTF_EXPORT_PRIVATE bool startsWithIgnoringASCIICase(const StringImpl*) const;
+ WTF_EXPORT_PRIVATE bool startsWithIgnoringASCIICase(const StringImpl&) const;
+ WTF_EXPORT_PRIVATE bool startsWith(UChar) const;
+ WTF_EXPORT_PRIVATE bool startsWith(const char*, unsigned matchLength) const;
template<unsigned matchLength> bool startsWith(const char (&prefix)[matchLength]) const { return startsWith(prefix, matchLength - 1); }
- WTF_EXPORT_STRING_API bool hasInfixStartingAt(const StringImpl&, unsigned startOffset) const;
+ WTF_EXPORT_PRIVATE bool hasInfixStartingAt(const StringImpl&, unsigned startOffset) const;
- WTF_EXPORT_STRING_API bool endsWith(StringImpl*);
- WTF_EXPORT_STRING_API bool endsWith(StringImpl&);
- WTF_EXPORT_STRING_API bool endsWithIgnoringASCIICase(const StringImpl*) const;
- WTF_EXPORT_STRING_API bool endsWithIgnoringASCIICase(const StringImpl&) const;
- WTF_EXPORT_STRING_API bool endsWith(UChar) const;
- WTF_EXPORT_STRING_API bool endsWith(const char*, unsigned matchLength) const;
+ WTF_EXPORT_PRIVATE bool endsWith(StringImpl*);
+ WTF_EXPORT_PRIVATE bool endsWith(StringImpl&);
+ WTF_EXPORT_PRIVATE bool endsWithIgnoringASCIICase(const StringImpl*) const;
+ WTF_EXPORT_PRIVATE bool endsWithIgnoringASCIICase(const StringImpl&) const;
+ WTF_EXPORT_PRIVATE bool endsWith(UChar) const;
+ WTF_EXPORT_PRIVATE bool endsWith(const char*, unsigned matchLength) const;
template<unsigned matchLength> bool endsWith(const char (&prefix)[matchLength]) const { return endsWith(prefix, matchLength - 1); }
- WTF_EXPORT_STRING_API bool hasInfixEndingAt(const StringImpl&, unsigned endOffset) const;
+ WTF_EXPORT_PRIVATE bool hasInfixEndingAt(const StringImpl&, unsigned endOffset) const;
- WTF_EXPORT_STRING_API Ref<StringImpl> replace(UChar, UChar);
- WTF_EXPORT_STRING_API Ref<StringImpl> replace(UChar, StringImpl*);
+ WTF_EXPORT_PRIVATE Ref<StringImpl> replace(UChar, UChar);
+ WTF_EXPORT_PRIVATE Ref<StringImpl> replace(UChar, StringImpl*);
ALWAYS_INLINE Ref<StringImpl> replace(UChar pattern, const char* replacement, unsigned replacementLength) { return replace(pattern, reinterpret_cast<const LChar*>(replacement), replacementLength); }
- WTF_EXPORT_STRING_API Ref<StringImpl> replace(UChar, const LChar*, unsigned replacementLength);
+ WTF_EXPORT_PRIVATE Ref<StringImpl> replace(UChar, const LChar*, unsigned replacementLength);
Ref<StringImpl> replace(UChar, const UChar*, unsigned replacementLength);
- WTF_EXPORT_STRING_API Ref<StringImpl> replace(StringImpl*, StringImpl*);
- WTF_EXPORT_STRING_API Ref<StringImpl> replace(unsigned index, unsigned length, StringImpl*);
+ WTF_EXPORT_PRIVATE Ref<StringImpl> replace(StringImpl*, StringImpl*);
+ WTF_EXPORT_PRIVATE Ref<StringImpl> replace(unsigned index, unsigned length, StringImpl*);
- WTF_EXPORT_STRING_API UCharDirection defaultWritingDirection(bool* hasStrongDirectionality = nullptr);
+ WTF_EXPORT_PRIVATE UCharDirection defaultWritingDirection(bool* hasStrongDirectionality = nullptr);
#if USE(CF)
RetainPtr<CFStringRef> createCFString();
@@ -464,7 +464,7 @@
#endif
#ifdef __OBJC__
- WTF_EXPORT_STRING_API operator NSString *();
+ WTF_EXPORT_PRIVATE operator NSString *();
#endif
#if STRING_STATS
@@ -537,25 +537,25 @@
#endif
-WTF_EXPORT_STRING_API bool equal(const StringImpl*, const StringImpl*);
-WTF_EXPORT_STRING_API bool equal(const StringImpl*, const LChar*);
+WTF_EXPORT_PRIVATE bool equal(const StringImpl*, const StringImpl*);
+WTF_EXPORT_PRIVATE bool equal(const StringImpl*, const LChar*);
inline bool equal(const StringImpl* a, const char* b) { return equal(a, reinterpret_cast<const LChar*>(b)); }
-WTF_EXPORT_STRING_API bool equal(const StringImpl*, const LChar*, unsigned);
-WTF_EXPORT_STRING_API bool equal(const StringImpl*, const UChar*, unsigned);
+WTF_EXPORT_PRIVATE bool equal(const StringImpl*, const LChar*, unsigned);
+WTF_EXPORT_PRIVATE bool equal(const StringImpl*, const UChar*, unsigned);
inline bool equal(const StringImpl* a, const char* b, unsigned length) { return equal(a, reinterpret_cast<const LChar*>(b), length); }
inline bool equal(const LChar* a, StringImpl* b) { return equal(b, a); }
inline bool equal(const char* a, StringImpl* b) { return equal(b, reinterpret_cast<const LChar*>(a)); }
-WTF_EXPORT_STRING_API bool equal(const StringImpl& a, const StringImpl& b);
+WTF_EXPORT_PRIVATE bool equal(const StringImpl& a, const StringImpl& b);
-WTF_EXPORT_STRING_API bool equalIgnoringNullity(StringImpl*, StringImpl*);
-WTF_EXPORT_STRING_API bool equalIgnoringNullity(const UChar*, size_t length, StringImpl*);
+WTF_EXPORT_PRIVATE bool equalIgnoringNullity(StringImpl*, StringImpl*);
+WTF_EXPORT_PRIVATE bool equalIgnoringNullity(const UChar*, size_t length, StringImpl*);
bool equalIgnoringASCIICase(const StringImpl&, const StringImpl&);
-WTF_EXPORT_STRING_API bool equalIgnoringASCIICase(const StringImpl*, const StringImpl*);
+WTF_EXPORT_PRIVATE bool equalIgnoringASCIICase(const StringImpl*, const StringImpl*);
bool equalIgnoringASCIICase(const StringImpl&, const char*);
bool equalIgnoringASCIICase(const StringImpl*, const char*);
-WTF_EXPORT_STRING_API bool equalIgnoringASCIICaseNonNull(const StringImpl*, const StringImpl*);
+WTF_EXPORT_PRIVATE bool equalIgnoringASCIICaseNonNull(const StringImpl*, const StringImpl*);
template<unsigned length> bool equalLettersIgnoringASCIICase(const StringImpl&, const char (&lowercaseLetters)[length]);
template<unsigned length> bool equalLettersIgnoringASCIICase(const StringImpl*, const char (&lowercaseLetters)[length]);
Modified: trunk/Source/WTF/wtf/text/StringView.h (230089 => 230090)
--- trunk/Source/WTF/wtf/text/StringView.h 2018-03-30 01:24:00 UTC (rev 230089)
+++ trunk/Source/WTF/wtf/text/StringView.h 2018-03-30 02:36:03 UTC (rev 230090)
@@ -97,16 +97,16 @@
#if USE(CF)
// This function converts null strings to empty strings.
- WTF_EXPORT_STRING_API RetainPtr<CFStringRef> createCFStringWithoutCopying() const;
+ WTF_EXPORT_PRIVATE RetainPtr<CFStringRef> createCFStringWithoutCopying() const;
#endif
#ifdef __OBJC__
// These functions convert null strings to empty strings.
- WTF_EXPORT_STRING_API RetainPtr<NSString> createNSString() const;
- WTF_EXPORT_STRING_API RetainPtr<NSString> createNSStringWithoutCopying() const;
+ WTF_EXPORT_PRIVATE RetainPtr<NSString> createNSString() const;
+ WTF_EXPORT_PRIVATE RetainPtr<NSString> createNSStringWithoutCopying() const;
#endif
- WTF_EXPORT_STRING_API CString utf8(ConversionMode = LenientConversion) const;
+ WTF_EXPORT_PRIVATE CString utf8(ConversionMode = LenientConversion) const;
class UpconvertedCharacters;
UpconvertedCharacters upconvertedCharacters() const;
@@ -127,22 +127,22 @@
size_t find(UChar, unsigned start = 0) const;
size_t find(CodeUnitMatchFunction, unsigned start = 0) const;
- WTF_EXPORT_STRING_API size_t find(StringView, unsigned start) const;
+ WTF_EXPORT_PRIVATE size_t find(StringView, unsigned start) const;
size_t reverseFind(UChar, unsigned index = UINT_MAX) const;
- WTF_EXPORT_STRING_API size_t findIgnoringASCIICase(const StringView&) const;
- WTF_EXPORT_STRING_API size_t findIgnoringASCIICase(const StringView&, unsigned startOffset) const;
+ WTF_EXPORT_PRIVATE size_t findIgnoringASCIICase(const StringView&) const;
+ WTF_EXPORT_PRIVATE size_t findIgnoringASCIICase(const StringView&, unsigned startOffset) const;
bool contains(UChar) const;
- WTF_EXPORT_STRING_API bool containsIgnoringASCIICase(const StringView&) const;
- WTF_EXPORT_STRING_API bool containsIgnoringASCIICase(const StringView&, unsigned startOffset) const;
+ WTF_EXPORT_PRIVATE bool containsIgnoringASCIICase(const StringView&) const;
+ WTF_EXPORT_PRIVATE bool containsIgnoringASCIICase(const StringView&, unsigned startOffset) const;
- WTF_EXPORT_STRING_API bool startsWith(const StringView&) const;
- WTF_EXPORT_STRING_API bool startsWithIgnoringASCIICase(const StringView&) const;
+ WTF_EXPORT_PRIVATE bool startsWith(const StringView&) const;
+ WTF_EXPORT_PRIVATE bool startsWithIgnoringASCIICase(const StringView&) const;
- WTF_EXPORT_STRING_API bool endsWith(const StringView&) const;
- WTF_EXPORT_STRING_API bool endsWithIgnoringASCIICase(const StringView&) const;
+ WTF_EXPORT_PRIVATE bool endsWith(const StringView&) const;
+ WTF_EXPORT_PRIVATE bool endsWithIgnoringASCIICase(const StringView&) const;
int toInt() const;
int toInt(bool& isValid) const;
@@ -166,9 +166,9 @@
StringView stripLeadingAndTrailingMatchedCharacters(const CharacterType*, const MatchedCharacterPredicate&);
#if CHECK_STRINGVIEW_LIFETIME
- WTF_EXPORT_STRING_API bool underlyingStringIsValid() const;
- WTF_EXPORT_STRING_API void setUnderlyingString(const StringImpl*);
- WTF_EXPORT_STRING_API void setUnderlyingString(const StringView&);
+ WTF_EXPORT_PRIVATE bool underlyingStringIsValid() const;
+ WTF_EXPORT_PRIVATE void setUnderlyingString(const StringImpl*);
+ WTF_EXPORT_PRIVATE void setUnderlyingString(const StringView&);
#else
bool underlyingStringIsValid() const { return true; }
void setUnderlyingString(const StringImpl*) { }
Modified: trunk/Source/WTF/wtf/text/SymbolImpl.h (230089 => 230090)
--- trunk/Source/WTF/wtf/text/SymbolImpl.h 2018-03-30 01:24:00 UTC (rev 230089)
+++ trunk/Source/WTF/wtf/text/SymbolImpl.h 2018-03-30 02:36:03 UTC (rev 230090)
@@ -50,8 +50,8 @@
RegisteredSymbolImpl* asRegisteredSymbolImpl();
- WTF_EXPORT_STRING_API static Ref<SymbolImpl> createNullSymbol();
- WTF_EXPORT_STRING_API static Ref<SymbolImpl> create(StringImpl& rep);
+ WTF_EXPORT_PRIVATE static Ref<SymbolImpl> createNullSymbol();
+ WTF_EXPORT_PRIVATE static Ref<SymbolImpl> create(StringImpl& rep);
class StaticSymbolImpl : private StringImplShape {
WTF_MAKE_NONCOPYABLE(StaticSymbolImpl);
@@ -126,8 +126,8 @@
class PrivateSymbolImpl : public SymbolImpl {
public:
- WTF_EXPORT_STRING_API static Ref<PrivateSymbolImpl> createNullSymbol();
- WTF_EXPORT_STRING_API static Ref<PrivateSymbolImpl> create(StringImpl& rep);
+ WTF_EXPORT_PRIVATE static Ref<PrivateSymbolImpl> createNullSymbol();
+ WTF_EXPORT_PRIVATE static Ref<PrivateSymbolImpl> create(StringImpl& rep);
private:
PrivateSymbolImpl(const LChar* characters, unsigned length, Ref<StringImpl>&& base)
Modified: trunk/Source/WTF/wtf/text/WTFString.h (230089 => 230090)
--- trunk/Source/WTF/wtf/text/WTFString.h 2018-03-30 01:24:00 UTC (rev 230089)
+++ trunk/Source/WTF/wtf/text/WTFString.h 2018-03-30 02:36:03 UTC (rev 230090)
@@ -40,25 +40,25 @@
// Declarations of string operations
-WTF_EXPORT_STRING_API int charactersToIntStrict(const LChar*, size_t, bool* ok = nullptr, int base = 10);
-WTF_EXPORT_STRING_API int charactersToIntStrict(const UChar*, size_t, bool* ok = nullptr, int base = 10);
-WTF_EXPORT_STRING_API unsigned charactersToUIntStrict(const LChar*, size_t, bool* ok = nullptr, int base = 10);
-WTF_EXPORT_STRING_API unsigned charactersToUIntStrict(const UChar*, size_t, bool* ok = nullptr, int base = 10);
+WTF_EXPORT_PRIVATE int charactersToIntStrict(const LChar*, size_t, bool* ok = nullptr, int base = 10);
+WTF_EXPORT_PRIVATE int charactersToIntStrict(const UChar*, size_t, bool* ok = nullptr, int base = 10);
+WTF_EXPORT_PRIVATE unsigned charactersToUIntStrict(const LChar*, size_t, bool* ok = nullptr, int base = 10);
+WTF_EXPORT_PRIVATE unsigned charactersToUIntStrict(const UChar*, size_t, bool* ok = nullptr, int base = 10);
int64_t charactersToInt64Strict(const LChar*, size_t, bool* ok = nullptr, int base = 10);
int64_t charactersToInt64Strict(const UChar*, size_t, bool* ok = nullptr, int base = 10);
-WTF_EXPORT_STRING_API uint64_t charactersToUInt64Strict(const LChar*, size_t, bool* ok = nullptr, int base = 10);
-WTF_EXPORT_STRING_API uint64_t charactersToUInt64Strict(const UChar*, size_t, bool* ok = nullptr, int base = 10);
+WTF_EXPORT_PRIVATE uint64_t charactersToUInt64Strict(const LChar*, size_t, bool* ok = nullptr, int base = 10);
+WTF_EXPORT_PRIVATE uint64_t charactersToUInt64Strict(const UChar*, size_t, bool* ok = nullptr, int base = 10);
intptr_t charactersToIntPtrStrict(const LChar*, size_t, bool* ok = nullptr, int base = 10);
intptr_t charactersToIntPtrStrict(const UChar*, size_t, bool* ok = nullptr, int base = 10);
-WTF_EXPORT_STRING_API int charactersToInt(const LChar*, size_t, bool* ok = nullptr); // ignores trailing garbage
-WTF_EXPORT_STRING_API int charactersToInt(const UChar*, size_t, bool* ok = nullptr); // ignores trailing garbage
+WTF_EXPORT_PRIVATE int charactersToInt(const LChar*, size_t, bool* ok = nullptr); // ignores trailing garbage
+WTF_EXPORT_PRIVATE int charactersToInt(const UChar*, size_t, bool* ok = nullptr); // ignores trailing garbage
unsigned charactersToUInt(const LChar*, size_t, bool* ok = nullptr); // ignores trailing garbage
unsigned charactersToUInt(const UChar*, size_t, bool* ok = nullptr); // ignores trailing garbage
int64_t charactersToInt64(const LChar*, size_t, bool* ok = nullptr); // ignores trailing garbage
int64_t charactersToInt64(const UChar*, size_t, bool* ok = nullptr); // ignores trailing garbage
uint64_t charactersToUInt64(const LChar*, size_t, bool* ok = nullptr); // ignores trailing garbage
-WTF_EXPORT_STRING_API uint64_t charactersToUInt64(const UChar*, size_t, bool* ok = nullptr); // ignores trailing garbage
+WTF_EXPORT_PRIVATE uint64_t charactersToUInt64(const UChar*, size_t, bool* ok = nullptr); // ignores trailing garbage
intptr_t charactersToIntPtr(const LChar*, size_t, bool* ok = nullptr); // ignores trailing garbage
intptr_t charactersToIntPtr(const UChar*, size_t, bool* ok = nullptr); // ignores trailing garbage
@@ -65,12 +65,12 @@
// FIXME: Like the strict functions above, these give false for "ok" when there is trailing garbage.
// Like the non-strict functions above, these return the value when there is trailing garbage.
// It would be better if these were more consistent with the above functions instead.
-WTF_EXPORT_STRING_API double charactersToDouble(const LChar*, size_t, bool* ok = nullptr);
-WTF_EXPORT_STRING_API double charactersToDouble(const UChar*, size_t, bool* ok = nullptr);
-WTF_EXPORT_STRING_API float charactersToFloat(const LChar*, size_t, bool* ok = nullptr);
-WTF_EXPORT_STRING_API float charactersToFloat(const UChar*, size_t, bool* ok = nullptr);
-WTF_EXPORT_STRING_API float charactersToFloat(const LChar*, size_t, size_t& parsedLength);
-WTF_EXPORT_STRING_API float charactersToFloat(const UChar*, size_t, size_t& parsedLength);
+WTF_EXPORT_PRIVATE double charactersToDouble(const LChar*, size_t, bool* ok = nullptr);
+WTF_EXPORT_PRIVATE double charactersToDouble(const UChar*, size_t, bool* ok = nullptr);
+WTF_EXPORT_PRIVATE float charactersToFloat(const LChar*, size_t, bool* ok = nullptr);
+WTF_EXPORT_PRIVATE float charactersToFloat(const UChar*, size_t, bool* ok = nullptr);
+WTF_EXPORT_PRIVATE float charactersToFloat(const LChar*, size_t, size_t& parsedLength);
+WTF_EXPORT_PRIVATE float charactersToFloat(const UChar*, size_t, size_t& parsedLength);
template<bool isSpecialCharacter(UChar), typename CharacterType> bool isAllSpecialCharacters(const CharacterType*, size_t);
@@ -82,7 +82,7 @@
String() = default;
// Construct a string with UTF-16 data.
- WTF_EXPORT_STRING_API String(const UChar* characters, unsigned length);
+ WTF_EXPORT_PRIVATE String(const UChar* characters, unsigned length);
// Construct a string by copying the contents of a vector. To avoid
// copying, consider using String::adopt instead.
@@ -96,15 +96,15 @@
explicit String(const Vector<UChar, inlineCapacity, OverflowHandler>&);
// Construct a string with UTF-16 data, from a null-terminated source.
- WTF_EXPORT_STRING_API String(const UChar*);
+ WTF_EXPORT_PRIVATE String(const UChar*);
// Construct a string with latin1 data.
- WTF_EXPORT_STRING_API String(const LChar* characters, unsigned length);
- WTF_EXPORT_STRING_API String(const char* characters, unsigned length);
+ WTF_EXPORT_PRIVATE String(const LChar* characters, unsigned length);
+ WTF_EXPORT_PRIVATE String(const char* characters, unsigned length);
// Construct a string with latin1 data, from a null-terminated source.
- WTF_EXPORT_STRING_API String(const LChar* characters);
- WTF_EXPORT_STRING_API String(const char* characters);
+ WTF_EXPORT_PRIVATE String(const LChar* characters);
+ WTF_EXPORT_PRIVATE String(const char* characters);
// Construct a string referencing an existing StringImpl.
String(StringImpl&);
@@ -119,7 +119,7 @@
String(StaticStringImpl*);
// Construct a string from a constant string literal.
- WTF_EXPORT_STRING_API String(ASCIILiteral);
+ WTF_EXPORT_PRIVATE String(ASCIILiteral);
// Construct a string from a constant string literal.
// This constructor is the "big" version, as it put the length in the function call and generate bigger code.
@@ -160,27 +160,27 @@
unsigned sizeInBytes() const { return m_impl ? m_impl->length() * (is8Bit() ? sizeof(LChar) : sizeof(UChar)) : 0; }
- WTF_EXPORT_STRING_API CString ascii() const;
- WTF_EXPORT_STRING_API CString latin1() const;
+ WTF_EXPORT_PRIVATE CString ascii() const;
+ WTF_EXPORT_PRIVATE CString latin1() const;
- WTF_EXPORT_STRING_API CString utf8(ConversionMode) const;
- WTF_EXPORT_STRING_API CString utf8() const;
+ WTF_EXPORT_PRIVATE CString utf8(ConversionMode) const;
+ WTF_EXPORT_PRIVATE CString utf8() const;
UChar characterAt(unsigned index) const;
UChar operator[](unsigned index) const { return characterAt(index); }
- WTF_EXPORT_STRING_API static String number(int);
- WTF_EXPORT_STRING_API static String number(unsigned);
- WTF_EXPORT_STRING_API static String number(long);
- WTF_EXPORT_STRING_API static String number(unsigned long);
- WTF_EXPORT_STRING_API static String number(long long);
- WTF_EXPORT_STRING_API static String number(unsigned long long);
+ WTF_EXPORT_PRIVATE static String number(int);
+ WTF_EXPORT_PRIVATE static String number(unsigned);
+ WTF_EXPORT_PRIVATE static String number(long);
+ WTF_EXPORT_PRIVATE static String number(unsigned long);
+ WTF_EXPORT_PRIVATE static String number(long long);
+ WTF_EXPORT_PRIVATE static String number(unsigned long long);
- WTF_EXPORT_STRING_API static String number(double, unsigned precision = 6, TrailingZerosTruncatingPolicy = TruncateTrailingZeros);
+ WTF_EXPORT_PRIVATE static String number(double, unsigned precision = 6, TrailingZerosTruncatingPolicy = TruncateTrailingZeros);
// Number to String conversion following the ECMAScript definition.
- WTF_EXPORT_STRING_API static String numberToStringECMAScript(double);
- WTF_EXPORT_STRING_API static String numberToStringFixedWidth(double, unsigned decimalPlaces);
+ WTF_EXPORT_PRIVATE static String numberToStringECMAScript(double);
+ WTF_EXPORT_PRIVATE static String numberToStringFixedWidth(double, unsigned decimalPlaces);
// Find a single character or string, also with match function & latin1 forms.
size_t find(UChar character, unsigned start = 0) const { return m_impl ? m_impl->find(character, start) : notFound; }
@@ -197,9 +197,9 @@
size_t reverseFind(UChar character, unsigned start = std::numeric_limits<unsigned>::max()) const { return m_impl ? m_impl->reverseFind(character, start) : notFound; }
size_t reverseFind(const String& string, unsigned start = std::numeric_limits<unsigned>::max()) const { return m_impl ? m_impl->reverseFind(string.impl(), start) : notFound; }
- WTF_EXPORT_STRING_API Vector<UChar> charactersWithNullTermination() const;
+ WTF_EXPORT_PRIVATE Vector<UChar> charactersWithNullTermination() const;
- WTF_EXPORT_STRING_API UChar32 characterStartingAt(unsigned) const;
+ WTF_EXPORT_PRIVATE UChar32 characterStartingAt(unsigned) const;
bool contains(UChar character) const { return find(character) != notFound; }
bool contains(const LChar* string) const { return find(string) != notFound; }
@@ -220,13 +220,13 @@
template<unsigned matchLength> bool endsWith(const char (&prefix)[matchLength]) const { return m_impl ? m_impl->endsWith<matchLength>(prefix) : !matchLength; }
bool hasInfixEndingAt(const String& suffix, unsigned endOffset) const { return m_impl && suffix.impl() && m_impl->hasInfixEndingAt(*suffix.impl(), endOffset); }
- WTF_EXPORT_STRING_API void append(const String&);
- WTF_EXPORT_STRING_API void append(LChar);
+ WTF_EXPORT_PRIVATE void append(const String&);
+ WTF_EXPORT_PRIVATE void append(LChar);
void append(char character) { append(static_cast<LChar>(character)); };
- WTF_EXPORT_STRING_API void append(UChar);
- WTF_EXPORT_STRING_API void append(const LChar*, unsigned length);
- WTF_EXPORT_STRING_API void append(const UChar*, unsigned length);
- WTF_EXPORT_STRING_API void insert(const String&, unsigned position);
+ WTF_EXPORT_PRIVATE void append(UChar);
+ WTF_EXPORT_PRIVATE void append(const LChar*, unsigned length);
+ WTF_EXPORT_PRIVATE void append(const UChar*, unsigned length);
+ WTF_EXPORT_PRIVATE void insert(const String&, unsigned position);
String& replace(UChar target, UChar replacement);
String& replace(UChar target, const String& replacement);
@@ -234,35 +234,35 @@
String& replace(unsigned start, unsigned length, const String& replacement);
template<unsigned characterCount> String& replaceWithLiteral(UChar target, const char (&replacement)[characterCount]);
- WTF_EXPORT_STRING_API void truncate(unsigned length);
- WTF_EXPORT_STRING_API void remove(unsigned position, unsigned length = 1);
+ WTF_EXPORT_PRIVATE void truncate(unsigned length);
+ WTF_EXPORT_PRIVATE void remove(unsigned position, unsigned length = 1);
- WTF_EXPORT_STRING_API String substring(unsigned position, unsigned length = std::numeric_limits<unsigned>::max()) const;
- WTF_EXPORT_STRING_API String substringSharingImpl(unsigned position, unsigned length = std::numeric_limits<unsigned>::max()) const;
+ WTF_EXPORT_PRIVATE String substring(unsigned position, unsigned length = std::numeric_limits<unsigned>::max()) const;
+ WTF_EXPORT_PRIVATE String substringSharingImpl(unsigned position, unsigned length = std::numeric_limits<unsigned>::max()) const;
String left(unsigned length) const { return substring(0, length); }
String right(unsigned length) const { return substring(this->length() - length, length); }
- WTF_EXPORT_STRING_API String convertToASCIILowercase() const;
- WTF_EXPORT_STRING_API String convertToASCIIUppercase() const;
- WTF_EXPORT_STRING_API String convertToLowercaseWithoutLocale() const;
- WTF_EXPORT_STRING_API String convertToLowercaseWithoutLocaleStartingAtFailingIndex8Bit(unsigned) const;
- WTF_EXPORT_STRING_API String convertToUppercaseWithoutLocale() const;
- WTF_EXPORT_STRING_API String convertToLowercaseWithLocale(const AtomicString& localeIdentifier) const;
- WTF_EXPORT_STRING_API String convertToUppercaseWithLocale(const AtomicString& localeIdentifier) const;
+ WTF_EXPORT_PRIVATE String convertToASCIILowercase() const;
+ WTF_EXPORT_PRIVATE String convertToASCIIUppercase() const;
+ WTF_EXPORT_PRIVATE String convertToLowercaseWithoutLocale() const;
+ WTF_EXPORT_PRIVATE String convertToLowercaseWithoutLocaleStartingAtFailingIndex8Bit(unsigned) const;
+ WTF_EXPORT_PRIVATE String convertToUppercaseWithoutLocale() const;
+ WTF_EXPORT_PRIVATE String convertToLowercaseWithLocale(const AtomicString& localeIdentifier) const;
+ WTF_EXPORT_PRIVATE String convertToUppercaseWithLocale(const AtomicString& localeIdentifier) const;
- WTF_EXPORT_STRING_API String stripWhiteSpace() const;
- WTF_EXPORT_STRING_API String simplifyWhiteSpace() const;
- WTF_EXPORT_STRING_API String simplifyWhiteSpace(CodeUnitMatchFunction) const;
+ WTF_EXPORT_PRIVATE String stripWhiteSpace() const;
+ WTF_EXPORT_PRIVATE String simplifyWhiteSpace() const;
+ WTF_EXPORT_PRIVATE String simplifyWhiteSpace(CodeUnitMatchFunction) const;
- WTF_EXPORT_STRING_API String stripLeadingAndTrailingCharacters(CodeUnitMatchFunction) const;
- WTF_EXPORT_STRING_API String removeCharacters(CodeUnitMatchFunction) const;
+ WTF_EXPORT_PRIVATE String stripLeadingAndTrailingCharacters(CodeUnitMatchFunction) const;
+ WTF_EXPORT_PRIVATE String removeCharacters(CodeUnitMatchFunction) const;
// Returns the string with case folded for case insensitive comparison.
// Use convertToASCIILowercase instead if ASCII case insensitive comparison is desired.
- WTF_EXPORT_STRING_API String foldCase() const;
+ WTF_EXPORT_PRIVATE String foldCase() const;
- WTF_EXPORT_STRING_API static String format(const char *, ...) WTF_ATTRIBUTE_PRINTF(1, 2);
- WTF_EXPORT_STRING_API static String formatWithArguments(const char *, va_list) WTF_ATTRIBUTE_PRINTF(1, 0);
+ WTF_EXPORT_PRIVATE static String format(const char *, ...) WTF_ATTRIBUTE_PRINTF(1, 2);
+ WTF_EXPORT_PRIVATE static String formatWithArguments(const char *, va_list) WTF_ATTRIBUTE_PRINTF(1, 0);
// Returns an uninitialized string. The characters needs to be written
// into the buffer returned in data before the returned string is used.
@@ -269,44 +269,44 @@
static String createUninitialized(unsigned length, UChar*& data) { return StringImpl::createUninitialized(length, data); }
static String createUninitialized(unsigned length, LChar*& data) { return StringImpl::createUninitialized(length, data); }
- WTF_EXPORT_STRING_API void split(const String& separator, bool allowEmptyEntries, Vector<String>& result) const;
+ WTF_EXPORT_PRIVATE void split(const String& separator, bool allowEmptyEntries, Vector<String>& result) const;
void split(const String& separator, Vector<String>& result) const { split(separator, false, result); }
using SplitFunctor = WTF::Function<void(const StringView&)>;
- WTF_EXPORT_STRING_API void split(UChar separator, bool allowEmptyEntries, const SplitFunctor&) const;
- WTF_EXPORT_STRING_API void split(UChar separator, bool allowEmptyEntries, Vector<String>& result) const;
+ WTF_EXPORT_PRIVATE void split(UChar separator, bool allowEmptyEntries, const SplitFunctor&) const;
+ WTF_EXPORT_PRIVATE void split(UChar separator, bool allowEmptyEntries, Vector<String>& result) const;
void split(UChar separator, Vector<String>& result) const { split(separator, false, result); }
Vector<String> split(UChar separator) const;
Vector<String> split(const String& separator) const;
- WTF_EXPORT_STRING_API int toIntStrict(bool* ok = nullptr, int base = 10) const;
- WTF_EXPORT_STRING_API unsigned toUIntStrict(bool* ok = nullptr, int base = 10) const;
- WTF_EXPORT_STRING_API int64_t toInt64Strict(bool* ok = nullptr, int base = 10) const;
- WTF_EXPORT_STRING_API uint64_t toUInt64Strict(bool* ok = nullptr, int base = 10) const;
- WTF_EXPORT_STRING_API intptr_t toIntPtrStrict(bool* ok = nullptr, int base = 10) const;
+ WTF_EXPORT_PRIVATE int toIntStrict(bool* ok = nullptr, int base = 10) const;
+ WTF_EXPORT_PRIVATE unsigned toUIntStrict(bool* ok = nullptr, int base = 10) const;
+ WTF_EXPORT_PRIVATE int64_t toInt64Strict(bool* ok = nullptr, int base = 10) const;
+ WTF_EXPORT_PRIVATE uint64_t toUInt64Strict(bool* ok = nullptr, int base = 10) const;
+ WTF_EXPORT_PRIVATE intptr_t toIntPtrStrict(bool* ok = nullptr, int base = 10) const;
- WTF_EXPORT_STRING_API int toInt(bool* ok = nullptr) const;
- WTF_EXPORT_STRING_API unsigned toUInt(bool* ok = nullptr) const;
- WTF_EXPORT_STRING_API int64_t toInt64(bool* ok = nullptr) const;
- WTF_EXPORT_STRING_API uint64_t toUInt64(bool* ok = nullptr) const;
- WTF_EXPORT_STRING_API intptr_t toIntPtr(bool* ok = nullptr) const;
+ WTF_EXPORT_PRIVATE int toInt(bool* ok = nullptr) const;
+ WTF_EXPORT_PRIVATE unsigned toUInt(bool* ok = nullptr) const;
+ WTF_EXPORT_PRIVATE int64_t toInt64(bool* ok = nullptr) const;
+ WTF_EXPORT_PRIVATE uint64_t toUInt64(bool* ok = nullptr) const;
+ WTF_EXPORT_PRIVATE intptr_t toIntPtr(bool* ok = nullptr) const;
// FIXME: Like the strict functions above, these give false for "ok" when there is trailing garbage.
// Like the non-strict functions above, these return the value when there is trailing garbage.
// It would be better if these were more consistent with the above functions instead.
- WTF_EXPORT_STRING_API double toDouble(bool* ok = nullptr) const;
- WTF_EXPORT_STRING_API float toFloat(bool* ok = nullptr) const;
+ WTF_EXPORT_PRIVATE double toDouble(bool* ok = nullptr) const;
+ WTF_EXPORT_PRIVATE float toFloat(bool* ok = nullptr) const;
bool percentage(int& percentage) const;
#if COMPILER_SUPPORTS(CXX_REFERENCE_QUALIFIED_FUNCTIONS)
- WTF_EXPORT_STRING_API String isolatedCopy() const &;
- WTF_EXPORT_STRING_API String isolatedCopy() &&;
+ WTF_EXPORT_PRIVATE String isolatedCopy() const &;
+ WTF_EXPORT_PRIVATE String isolatedCopy() &&;
#else
- WTF_EXPORT_STRING_API String isolatedCopy() const;
+ WTF_EXPORT_PRIVATE String isolatedCopy() const;
#endif
- WTF_EXPORT_STRING_API bool isSafeToSendToAnotherThread() const;
+ WTF_EXPORT_PRIVATE bool isSafeToSendToAnotherThread() const;
// Prevent Strings from being implicitly convertable to bool as it will be ambiguous on any platform that
// allows implicit conversion to another pointer type (e.g., Mac allows implicit conversion to NSString *).
@@ -316,12 +316,12 @@
operator UnspecifiedBoolTypeB() const;
#if USE(CF)
- WTF_EXPORT_STRING_API String(CFStringRef);
- WTF_EXPORT_STRING_API RetainPtr<CFStringRef> createCFString() const;
+ WTF_EXPORT_PRIVATE String(CFStringRef);
+ WTF_EXPORT_PRIVATE RetainPtr<CFStringRef> createCFString() const;
#endif
#ifdef __OBJC__
- WTF_EXPORT_STRING_API String(NSString *);
+ WTF_EXPORT_PRIVATE String(NSString *);
// This conversion converts the null string to an empty NSString rather than to nil.
// Given Cocoa idioms, this is a more useful default. Clients that need to preserve the
@@ -329,22 +329,22 @@
operator NSString *() const;
#endif
- WTF_EXPORT_STRING_API static String make8BitFrom16BitSource(const UChar*, size_t);
+ WTF_EXPORT_PRIVATE static String make8BitFrom16BitSource(const UChar*, size_t);
template<size_t inlineCapacity> static String make8BitFrom16BitSource(const Vector<UChar, inlineCapacity>&);
- WTF_EXPORT_STRING_API static String make16BitFrom8BitSource(const LChar*, size_t);
+ WTF_EXPORT_PRIVATE static String make16BitFrom8BitSource(const LChar*, size_t);
// String::fromUTF8 will return a null string if
// the input data contains invalid UTF-8 sequences.
- WTF_EXPORT_STRING_API static String fromUTF8(const LChar*, size_t);
- WTF_EXPORT_STRING_API static String fromUTF8(const LChar*);
+ WTF_EXPORT_PRIVATE static String fromUTF8(const LChar*, size_t);
+ WTF_EXPORT_PRIVATE static String fromUTF8(const LChar*);
static String fromUTF8(const char* characters, size_t length) { return fromUTF8(reinterpret_cast<const LChar*>(characters), length); };
static String fromUTF8(const char* string) { return fromUTF8(reinterpret_cast<const LChar*>(string)); };
- WTF_EXPORT_STRING_API static String fromUTF8(const CString&);
+ WTF_EXPORT_PRIVATE static String fromUTF8(const CString&);
static String fromUTF8(const Vector<LChar>& characters);
// Tries to convert the passed in string to UTF-8, but will fall back to Latin-1 if the string is not valid UTF-8.
- WTF_EXPORT_STRING_API static String fromUTF8WithLatin1Fallback(const LChar*, size_t);
+ WTF_EXPORT_PRIVATE static String fromUTF8WithLatin1Fallback(const LChar*, size_t);
static String fromUTF8WithLatin1Fallback(const char* characters, size_t length) { return fromUTF8WithLatin1Fallback(reinterpret_cast<const LChar*>(characters), length); };
// Determines the writing direction using the Unicode Bidi Algorithm rules P2 and P3.
@@ -362,7 +362,7 @@
unsigned existingHash() const { return isNull() ? 0 : impl()->existingHash(); }
#ifndef NDEBUG
- WTF_EXPORT_STRING_API void show() const;
+ WTF_EXPORT_PRIVATE void show() const;
#endif
// Turns this String empty if the StringImpl is not referenced by anyone else.
@@ -417,13 +417,13 @@
#endif
-WTF_EXPORT_STRING_API int codePointCompare(const String&, const String&);
+WTF_EXPORT_PRIVATE int codePointCompare(const String&, const String&);
bool codePointCompareLessThan(const String&, const String&);
template<typename CharacterType> void appendNumber(Vector<CharacterType>&, unsigned char number);
// Shared global empty string.
-WTF_EXPORT_STRING_API const String& emptyString();
+WTF_EXPORT_PRIVATE const String& emptyString();
template<typename> struct DefaultHash;
template<> struct DefaultHash<String> { using Hash = StringHash; };