[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/server array.cpp
From: |
Michael Carlson |
Subject: |
[Gnash-commit] gnash/server array.cpp |
Date: |
Tue, 24 Jan 2006 07:47:59 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch:
Changes by: Michael Carlson <address@hidden> 06/01/24 07:47:59
Modified files:
server : array.cpp
Log message:
Enclose return value of array::toString and join in parentheses. I
can't figure out if we're supposed to enclose them in parentheses or not - I've
added comments with a TODO about what I know so far.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/server/array.cpp.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
Patches:
Index: gnash/server/array.cpp
diff -u gnash/server/array.cpp:1.5 gnash/server/array.cpp:1.6
--- gnash/server/array.cpp:1.5 Tue Jan 24 07:32:52 2006
+++ gnash/server/array.cpp Tue Jan 24 07:47:59 2006
@@ -197,11 +197,15 @@
as_array_object* array = (as_array_object*) (as_object*)
fn.this_ptr;
unsigned int i;
- std::string temp,separator = ",";
+ std::string temp = "(",separator = ",";
if (fn.nargs > 0)
separator = fn.arg(0).to_string();
+ // TODO - confirm this is the right format!
+ // Reportedly, flash version 7 on linux, and Flash 8 on IE look
like
+ // "(1,2,3)" and "1,2,3" respectively - which should we mimic?
+ // I've chosen the former for now, because the parentheses help
clarity
for (i=0;i<array->elements.size() - 1;i++)
temp = temp + array->elements[i].to_string() +
separator;
@@ -209,6 +213,8 @@
if (array->elements.size() > 0)
temp = temp + array->elements[i].to_string();
+ temp = temp + ")";
+
fn.result->set_string(temp.c_str());
}
@@ -218,8 +224,12 @@
as_array_object* array = (as_array_object*) (as_object*)
fn.this_ptr;
unsigned int i;
- std::string temp;
+ std::string temp = "(";
+ // TODO - confirm this is the right format!
+ // Reportedly, flash version 7 on linux, and Flash 8 on IE look
like
+ // "(1,2,3)" and "1,2,3" respectively - which should we mimic?
+ // I've chosen the former for now, because the parentheses help
clarity
for (i=0;i<array->elements.size() - 1;i++)
temp = temp + array->elements[i].to_string() + ',';
@@ -227,6 +237,8 @@
if (array->elements.size() > 0)
temp = temp + array->elements[i].to_string();
+ temp = temp + ")";
+
fn.result->set_string(temp.c_str());
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash/server array.cpp,
Michael Carlson <=