summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/UString.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-02-03 09:55:33 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-02-03 09:55:33 +0100
commitcd44dc59cdfc39534aef4d417e9f3c412e3be139 (patch)
tree8d89889ba95ed6ec9322e733846cc9cce9d7dff1 /Source/JavaScriptCore/runtime/UString.h
parentd11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 (diff)
downloadqtwebkit-cd44dc59cdfc39534aef4d417e9f3c412e3be139.tar.gz
Imported WebKit commit fce473cb4d55aa9fe9d0b0322a2fffecb731b961 (http://svn.webkit.org/repository/webkit/trunk@106560)
Diffstat (limited to 'Source/JavaScriptCore/runtime/UString.h')
-rw-r--r--Source/JavaScriptCore/runtime/UString.h40
1 files changed, 16 insertions, 24 deletions
diff --git a/Source/JavaScriptCore/runtime/UString.h b/Source/JavaScriptCore/runtime/UString.h
index c05ae5081..668eb0489 100644
--- a/Source/JavaScriptCore/runtime/UString.h
+++ b/Source/JavaScriptCore/runtime/UString.h
@@ -33,18 +33,18 @@ public:
UString() { }
// Construct a string with UTF-16 data.
- UString(const UChar* characters, unsigned length);
+ JS_EXPORT_PRIVATE UString(const UChar* characters, unsigned length);
// Construct a string with UTF-16 data, from a null-terminated source.
- UString(const UChar*);
+ JS_EXPORT_PRIVATE UString(const UChar*);
// Construct a string with latin1 data.
UString(const LChar* characters, unsigned length);
- UString(const char* characters, unsigned length);
+ JS_EXPORT_PRIVATE UString(const char* characters, unsigned length);
// Construct a string with latin1 data, from a null-terminated source.
UString(const LChar* characters);
- UString(const char* characters);
+ JS_EXPORT_PRIVATE UString(const char* characters);
// Construct a string referencing an existing StringImpl.
UString(StringImpl* impl) : m_impl(impl) { }
@@ -99,9 +99,9 @@ public:
bool is8Bit() const { return m_impl->is8Bit(); }
- CString ascii() const;
+ JS_EXPORT_PRIVATE CString ascii() const;
CString latin1() const;
- CString utf8(bool strict = false) const;
+ JS_EXPORT_PRIVATE CString utf8(bool strict = false) const;
UChar operator[](unsigned index) const
{
@@ -112,11 +112,11 @@ public:
return m_impl->characters16()[index];
}
- static UString number(int);
- static UString number(unsigned);
- static UString number(long);
+ JS_EXPORT_PRIVATE static UString number(int);
+ JS_EXPORT_PRIVATE static UString number(unsigned);
+ JS_EXPORT_PRIVATE static UString number(long);
static UString number(long long);
- static UString number(double);
+ JS_EXPORT_PRIVATE static UString number(double);
// Find a single character or string, also with match function & latin1 forms.
size_t find(UChar c, unsigned start = 0) const
@@ -132,25 +132,17 @@ public:
size_t reverseFind(const UString& str, unsigned start = UINT_MAX) const
{ return m_impl ? m_impl->reverseFind(str.impl(), start) : notFound; }
- UString substringSharingImpl(unsigned pos, unsigned len = UINT_MAX) const;
+ JS_EXPORT_PRIVATE UString substringSharingImpl(unsigned pos, unsigned len = UINT_MAX) const;
private:
RefPtr<StringImpl> m_impl;
};
template<>
-inline const LChar* UString::getCharacters<LChar>() const
-{
- ASSERT(is8Bit());
- return characters8();
-}
+inline const LChar* UString::getCharacters<LChar>() const { return characters8(); }
template<>
-inline const UChar* UString::getCharacters<UChar>() const
-{
- ASSERT(!is8Bit());
- return characters16();
-}
+inline const UChar* UString::getCharacters<UChar>() const { return characters(); }
NEVER_INLINE bool equalSlowCase(const UString& s1, const UString& s2);
@@ -189,10 +181,10 @@ inline bool operator!=(const UString& s1, const UString& s2)
return !JSC::operator==(s1, s2);
}
-bool operator<(const UString& s1, const UString& s2);
-bool operator>(const UString& s1, const UString& s2);
+JS_EXPORT_PRIVATE bool operator<(const UString& s1, const UString& s2);
+JS_EXPORT_PRIVATE bool operator>(const UString& s1, const UString& s2);
-bool operator==(const UString& s1, const char* s2);
+JS_EXPORT_PRIVATE bool operator==(const UString& s1, const char* s2);
inline bool operator!=(const UString& s1, const char* s2)
{