Revision: 7487
Author: [email protected]
Date: Sun Apr 3 19:56:34 2011
Log: Explicitly use icu namespace.
Chromium builds with U_USING_ICU_NAMESPACE=0, so we need this.
Landing for [email protected].
http://code.google.com/p/v8/source/detail?r=7487
Modified:
/branches/bleeding_edge/src/extensions/experimental/break-iterator.cc
/branches/bleeding_edge/src/extensions/experimental/break-iterator.h
/branches/bleeding_edge/src/extensions/experimental/i18n-extension.cc
=======================================
--- /branches/bleeding_edge/src/extensions/experimental/break-iterator.cc
Fri Mar 4 09:22:03 2011
+++ /branches/bleeding_edge/src/extensions/experimental/break-iterator.cc
Sun Apr 3 19:56:34 2011
@@ -46,16 +46,16 @@
return NULL;
}
-UnicodeString* BreakIterator::ResetAdoptedText(
+icu::UnicodeString* BreakIterator::ResetAdoptedText(
v8::Handle<v8::Object> obj, v8::Handle<v8::Value> value) {
// Get the previous value from the internal field.
- UnicodeString* text = static_cast<UnicodeString*>(
+ icu::UnicodeString* text = static_cast<icu::UnicodeString*>(
obj->GetPointerFromInternalField(1));
delete text;
// Assign new value to the internal pointer.
v8::String::Value text_value(value);
- text = new UnicodeString(
+ text = new icu::UnicodeString(
reinterpret_cast<const UChar*>(*text_value), text_value.length());
obj->SetPointerInInternalField(1, text);
@@ -74,7 +74,7 @@
// pointing to a break iterator.
delete UnpackBreakIterator(persistent_object);
- delete static_cast<UnicodeString*>(
+ delete static_cast<icu::UnicodeString*>(
persistent_object->GetPointerFromInternalField(1));
// Then dispose of the persistent handle to JS object.
@@ -144,8 +144,9 @@
}
// TODO(cira): Remove cast once ICU fixes base BreakIterator class.
- int32_t status =
-
static_cast<RuleBasedBreakIterator*>(break_iterator)->getRuleStatus();
+ icu::RuleBasedBreakIterator* rule_based_iterator =
+ static_cast<icu::RuleBasedBreakIterator*>(break_iterator);
+ int32_t status = rule_based_iterator->getRuleStatus();
// Keep return values in sync with JavaScript BreakType enum.
if (status >= UBRK_WORD_NONE && status < UBRK_WORD_NONE_LIMIT) {
return v8::Int32::New(UBRK_WORD_NONE);
=======================================
--- /branches/bleeding_edge/src/extensions/experimental/break-iterator.h
Fri Mar 4 09:22:03 2011
+++ /branches/bleeding_edge/src/extensions/experimental/break-iterator.h
Sun Apr 3 19:56:34 2011
@@ -51,8 +51,8 @@
// Deletes the old value and sets the adopted text in
// corresponding JavaScript object.
- static UnicodeString* ResetAdoptedText(v8::Handle<v8::Object> obj,
- v8::Handle<v8::Value> text_value);
+ static icu::UnicodeString* ResetAdoptedText(v8::Handle<v8::Object> obj,
+ v8::Handle<v8::Value>
text_value);
// Release memory we allocated for the BreakIterator once the JS object
that
// holds the pointer gets garbage collected.
=======================================
--- /branches/bleeding_edge/src/extensions/experimental/i18n-extension.cc
Thu Mar 3 09:32:18 2011
+++ /branches/bleeding_edge/src/extensions/experimental/i18n-extension.cc
Sun Apr 3 19:56:34 2011
@@ -167,7 +167,7 @@
v8::Local<v8::Array> all_locales = v8::Array::New();
int count = 0;
- const Locale* icu_locales = icu::Locale::getAvailableLocales(count);
+ const icu::Locale* icu_locales = icu::Locale::getAvailableLocales(count);
for (int i = 0; i < count; ++i) {
all_locales->Set(i, v8::String::New(icu_locales[i].getName()));
}
@@ -230,7 +230,7 @@
icu::Locale icu_locale(base_locale.c_str());
icu::Locale display_locale =
icu::Locale(*v8::String::Utf8Value(args[1]->ToString()));
- UnicodeString result;
+ icu::UnicodeString result;
if (item == "language") {
icu_locale.getDisplayLanguage(display_locale, result);
} else if (item == "script") {
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev