summaryrefslogtreecommitdiff
path: root/src/3rdparty/webkit
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-08-11 13:20:16 +0200
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-08-11 14:19:29 +0200
commit1c4a75de75157f0ffa0a75d8c5f177bf45119c50 (patch)
treec255dc388c78cc67d15891303b4e52e6357a555d /src/3rdparty/webkit
parent1056df7f11e4c7964a72e89d02bd3016ccd2c9f1 (diff)
downloadqt4-tools-1c4a75de75157f0ffa0a75d8c5f177bf45119c50.tar.gz
Fix compile error on 64Bit
Added new overload with int64 parameter. Reviewed-by: Simon Hausmann
Diffstat (limited to 'src/3rdparty/webkit')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/UString.cpp31
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/UString.h3
2 files changed, 34 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/UString.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/UString.cpp
index 118751e35d..f64219c078 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/UString.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/UString.cpp
@@ -942,6 +942,37 @@ UString UString::from(int i)
return UString(p, static_cast<int>(end - p));
}
+#if PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC)
+UString UString::from(int64_t i)
+{
+ UChar buf[1 + sizeof(i) * 3];
+ UChar* end = buf + sizeof(buf) / sizeof(UChar);
+ UChar* p = end;
+
+ if (i == 0)
+ *--p = '0';
+ else if (i == LLONG_MIN) {
+ char minBuf[1 + sizeof(i) * 3];
+ snprintf(minBuf, sizeof(minBuf) - 1, "%I64d", LLONG_MIN);
+ return UString(minBuf);
+ } else {
+ bool negative = false;
+ if (i < 0) {
+ negative = true;
+ i = -i;
+ }
+ while (i) {
+ *--p = static_cast<unsigned short>((i % 10) + '0');
+ i /= 10;
+ }
+ if (negative)
+ *--p = '-';
+ }
+
+ return UString(p, static_cast<int>(end - p));
+}
+#endif
+
UString UString::from(unsigned int u)
{
UChar buf[sizeof(u) * 3];
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h b/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h
index d01b75de7e..f2572a9b5c 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/UString.h
@@ -256,6 +256,9 @@ namespace JSC {
}
static UString from(int);
+#if PLATFORM(WIN_OS) && PLATFORM(X86_64) && COMPILER(MSVC)
+ static UString from(int64_t i);
+#endif
static UString from(unsigned int);
static UString from(long);
static UString from(double);