gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/as_environment.h server/...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/as_environment.h server/...
Date: Thu, 19 Oct 2006 13:37:16 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/10/19 13:37:16

Modified files:
        .              : ChangeLog 
        server         : as_environment.h 
        server/swf     : ASHandlers.cpp 

Log message:
                * server/swf/ASHandlers.cpp (ActionSetVariable, 
ActionGetVariable):
                  pass the with_stack to get_variable/set_variable calls.
                * server/as_environment.h: made set_variable and get_variable
                  methods taking a with_stack back to public.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1314&r2=1.1315
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_environment.h?cvsroot=gnash&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/ASHandlers.cpp?cvsroot=gnash&r1=1.78&r2=1.79

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1314
retrieving revision 1.1315
diff -u -b -r1.1314 -r1.1315
--- ChangeLog   19 Oct 2006 12:51:34 -0000      1.1314
+++ ChangeLog   19 Oct 2006 13:37:16 -0000      1.1315
@@ -1,5 +1,12 @@
 2006-10-19 Sandro Santilli <address@hidden>
 
+       * server/swf/ASHandlers.cpp (ActionSetVariable, ActionGetVariable):
+         pass the with_stack to get_variable/set_variable calls.
+       * server/as_environment.h: made set_variable and get_variable
+         methods taking a with_stack back to public.
+
+2006-10-19 Sandro Santilli <address@hidden>
+
        * server/swf/ASHandlers.cpp (unsupported_action_handler): more 
          verbosity; (ActionWith): cleaned up; (ActionGetVariable): added
          note about probable reason for 'with' failing (will work on

Index: server/as_environment.h
===================================================================
RCS file: /sources/gnash/gnash/server/as_environment.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- server/as_environment.h     18 Oct 2006 13:50:06 -0000      1.24
+++ server/as_environment.h     19 Oct 2006 13:37:16 -0000      1.25
@@ -36,7 +36,7 @@
 //
 //
 
-/* $Id: as_environment.h,v 1.24 2006/10/18 13:50:06 strk Exp $ */
+/* $Id: as_environment.h,v 1.25 2006/10/19 13:37:16 strk Exp $ */
 
 #ifndef GNASH_AS_ENVIRONMENT_H
 #define GNASH_AS_ENVIRONMENT_H
@@ -161,6 +161,14 @@
        as_value get_variable_raw(const tu_string& varname) const;
 
        /// \brief
+       /// Return the (possibly UNDEFINED) value of the named var.
+       /// Variable name can contain path elements.
+       /// Uses the with_stack ActionContext
+       ///
+       as_value get_variable(const tu_string& varname,
+               const std::vector<with_stack_entry>& with_stack) const;
+
+       /// \brief
        /// Given a path to variable, set its value.
        /// Variable name can contain path elements.
        ///
@@ -169,6 +177,12 @@
        /// Given a variable name, set its value (no support for path)
        void    set_variable_raw(const tu_string& path, const as_value& val);
 
+       /// \brief
+       /// Given a path to variable, set its value,
+       /// using the with_stack ActionContext
+       void set_variable(const tu_string& path, const as_value& val,
+               const std::vector<with_stack_entry>& with_stack);
+
        /// Set/initialize the value of the local variable.
        void    set_local(const tu_string& varname, const as_value& val);
 
@@ -321,17 +335,6 @@
        void set_variable_raw(const tu_string& path, const as_value& val,
                const std::vector<with_stack_entry>& with_stack);
 
-       /// Given a path to variable, set its value.
-       void set_variable(const tu_string& path, const as_value& val,
-               const std::vector<with_stack_entry>& with_stack);
-
-       /// \brief
-       /// Return the (possibly UNDEFINED) value of the named var.
-       /// Variable name can contain path elements.
-       ///
-       as_value get_variable(const tu_string& varname,
-               const std::vector<with_stack_entry>& with_stack) const;
-
        /// Same of the above, but no support for path.
        as_value get_variable_raw(const tu_string& varname,
                const std::vector<with_stack_entry>& with_stack) const;

Index: server/swf/ASHandlers.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/swf/ASHandlers.cpp,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -b -r1.78 -r1.79
--- server/swf/ASHandlers.cpp   19 Oct 2006 12:51:34 -0000      1.78
+++ server/swf/ASHandlers.cpp   19 Oct 2006 13:37:16 -0000      1.79
@@ -34,7 +34,7 @@
 // forward this exception.
 //
 
-/* $Id: ASHandlers.cpp,v 1.78 2006/10/19 12:51:34 strk Exp $ */
+/* $Id: ASHandlers.cpp,v 1.79 2006/10/19 13:37:16 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -954,13 +954,7 @@
        as_value& top_value = env.top(0);
        tu_string var_string = top_value.to_tu_string();
 
-       // TODO: this call does not use the with_stack
-       //       from ActionExec !! this is probably the
-       //       reason why 'with' doesn't work.
-       //       I think we should add a get_variable
-       //       to the ActionExec class to make thes
-       //       calls simpler.
-       top_value = env.get_variable(var_string);
+       top_value = env.get_variable(var_string, thread.getWithStack());
 
        IF_VERBOSE_ACTION
        (
@@ -987,7 +981,8 @@
        // stack must be contain at least two items
        ensure_stack(env, 2); 
 
-       env.set_variable(env.top(1).to_tu_string(), env.top(0));
+       env.set_variable(env.top(1).to_tu_string(), env.top(0),
+               thread.getWithStack());
 
                IF_VERBOSE_ACTION (
        log_action("-- set var: %s", env.top(1).to_string());




reply via email to

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