gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. 253bdd94086b556cdd8f


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. 253bdd94086b556cdd8f2b58f13c09c11f35e3ed
Date: Sat, 16 Oct 2010 15:42:34 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  253bdd94086b556cdd8f2b58f13c09c11f35e3ed (commit)
       via  6412a46e60b11424a0ea8a6960c4e3b9826daea6 (commit)
       via  e7363ed7296736734b120b8f9f40bdc310e2d072 (commit)
      from  f409f53702411781fe1ad9dbdd6d0e61163a653d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=253bdd94086b556cdd8f2b58f13c09c11f35e3ed


commit 253bdd94086b556cdd8f2b58f13c09c11f35e3ed
Merge: 6412a46 f409f53
Author: Sandro Santilli <address@hidden>
Date:   Sat Oct 16 17:42:27 2010 +0200

    Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/gnash


http://git.savannah.gnu.org/cgit//commit/?id=6412a46e60b11424a0ea8a6960c4e3b9826daea6


commit 6412a46e60b11424a0ea8a6960c4e3b9826daea6
Author: Sandro Santilli <address@hidden>
Date:   Sat Oct 16 17:40:01 2010 +0200

    Add object support in ExternalInterface::toXML(as_value) -- TODO: procect 
from circula refs !

diff --git a/libcore/ExternalInterface.cpp b/libcore/ExternalInterface.cpp
index 814891d..cbdcfe8 100644
--- a/libcore/ExternalInterface.cpp
+++ b/libcore/ExternalInterface.cpp
@@ -213,8 +213,8 @@ ExternalInterface::toXML(const as_value &val)
     } else if (val.is_function()) {
         ss << "<function>" << val.to_string() << "</function>";
     } else if (val.is_object()) {
-//        as_object *obj = (as_object *)&val;
-//         ss << "<object></object>";
+        as_object *obj = val.get_object();
+        ss << objectToXML(obj);
     } else {
         log_error("Can't convert unknown type %d", val.to_string());
     }

http://git.savannah.gnu.org/cgit//commit/?id=e7363ed7296736734b120b8f9f40bdc310e2d072


commit e7363ed7296736734b120b8f9f40bdc310e2d072
Author: Sandro Santilli <address@hidden>
Date:   Sat Oct 16 17:39:26 2010 +0200

    Add non-converting as_value::get_object method (not requiring a VM arg)

diff --git a/libcore/as_value.cpp b/libcore/as_value.cpp
index 4714544..bdab196 100644
--- a/libcore/as_value.cpp
+++ b/libcore/as_value.cpp
@@ -508,6 +508,16 @@ as_value::to_function() const
     return 0;
 }
 
+as_object*
+as_value::get_object() const
+{
+    if (_type == OBJECT) {
+        return getObj();
+    }
+
+    return 0;
+}
+
 void
 as_value::set_undefined()
 {
diff --git a/libcore/as_value.h b/libcore/as_value.h
index 9f6658b..60093b9 100644
--- a/libcore/as_value.h
+++ b/libcore/as_value.h
@@ -257,6 +257,12 @@ public:
     ///                 contains the prototypes or constructors necessary for
     ///                 conversion.
     as_object* to_object(VM& vm) const;
+
+    /// Return the value as an as_object only if it is an as_object.
+    //
+    /// Note that this performs no conversion, so returns 0 if the as_value
+    /// is not an object.
+    as_object* get_object() const;
     
     /// Returns value as a MovieClip if it is a MovieClip.
     //

-----------------------------------------------------------------------

Summary of changes:
 libcore/ExternalInterface.cpp |    4 ++--
 libcore/as_value.cpp          |   10 ++++++++++
 libcore/as_value.h            |    6 ++++++
 3 files changed, 18 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]