Use char* instead of LChar* for the public interface of String construction from literals
https://bugs.webkit.org/show_bug.cgi?id=93402
Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-08-08
Reviewed by Michael Saboff.
Source/JavaScriptCore:
Update JSC' Identifier to use StringImpl::createFromLiteral with a char*.
* runtime/Identifier.cpp:
(JSC::IdentifierASCIIStringTranslator::translate):
Source/WTF:
When the initialization from literal was added, some constructor/initialization function were
using LChar for convenience.
Since those function should only take ASCII characters, using LChar* could cause confusion. This
patch intents to clarify this by using char* for all those APIs.
* wtf/text/AtomicString.cpp:
(WTF::CharBufferFromLiteralDataTranslator::hash):
(WTF::CharBufferFromLiteralDataTranslator::equal):
(WTF::CharBufferFromLiteralDataTranslator::translate):
(WTF::AtomicString::addFromLiteralData):
* wtf/text/AtomicString.h:
(WTF::AtomicString::AtomicString):
(AtomicString):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createFromLiteral):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::createFromLiteral):
Tools:
* TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::TEST):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
9 files changed