gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/array.h server/as_enviro...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/array.h server/as_enviro...
Date: Thu, 26 Apr 2007 07:00:30 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/04/26 07:00:29

Modified files:
        .              : ChangeLog 
        server         : array.h as_environment.cpp as_function.h 
                         as_object.cpp as_object.h character.cpp 
                         character.h edit_text_character.cpp 
                         edit_text_character.h 
        server/asobj   : Boolean.cpp Color.cpp ContextMenu.cpp 
                         CustomActions.cpp Error.cpp LoadVars.cpp 
                         Microphone.cpp Mouse.cpp Number.cpp 
                         Selection.cpp SharedObject.cpp Stage.h 
                         TextSnapshot.cpp Video.cpp gen-asclass.pl 
                         gen-asclass.sh string.cpp 
        testsuite/server: GetterSetterTest.cpp 

Log message:
        Changed get_text_value interface to return by std::string value. Closes 
bug #19695.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2997&r2=1.2998
http://cvs.savannah.gnu.org/viewcvs/gnash/server/array.h?cvsroot=gnash&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_environment.cpp?cvsroot=gnash&r1=1.70&r2=1.71
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_function.h?cvsroot=gnash&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.cpp?cvsroot=gnash&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_object.h?cvsroot=gnash&r1=1.54&r2=1.55
http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.cpp?cvsroot=gnash&r1=1.37&r2=1.38
http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.h?cvsroot=gnash&r1=1.71&r2=1.72
http://cvs.savannah.gnu.org/viewcvs/gnash/server/edit_text_character.cpp?cvsroot=gnash&r1=1.60&r2=1.61
http://cvs.savannah.gnu.org/viewcvs/gnash/server/edit_text_character.h?cvsroot=gnash&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Boolean.cpp?cvsroot=gnash&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Color.cpp?cvsroot=gnash&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/ContextMenu.cpp?cvsroot=gnash&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/CustomActions.cpp?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Error.cpp?cvsroot=gnash&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/LoadVars.cpp?cvsroot=gnash&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Microphone.cpp?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Mouse.cpp?cvsroot=gnash&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Number.cpp?cvsroot=gnash&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Selection.cpp?cvsroot=gnash&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/SharedObject.cpp?cvsroot=gnash&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Stage.h?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/TextSnapshot.cpp?cvsroot=gnash&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/Video.cpp?cvsroot=gnash&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/gen-asclass.pl?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/gen-asclass.sh?cvsroot=gnash&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/string.cpp?cvsroot=gnash&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/server/GetterSetterTest.cpp?cvsroot=gnash&r1=1.10&r2=1.11

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2997
retrieving revision 1.2998
diff -u -b -r1.2997 -r1.2998
--- ChangeLog   26 Apr 2007 02:45:51 -0000      1.2997
+++ ChangeLog   26 Apr 2007 07:00:29 -0000      1.2998
@@ -1,3 +1,21 @@
+2007-04-26 Sandro Santilli <address@hidden>
+
+       * server/array.h, server/as_environment.cpp, server/as_function.h,
+         server/as_object.cpp, server/as_object.h, server/character.cpp,
+         server/character.h, server/edit_text_character.cpp,
+         server/edit_text_character.h, server/asobj/Boolean.cpp,
+         server/asobj/Color.cpp, server/asobj/ContextMenu.cpp,
+         server/asobj/CustomActions.cpp, server/asobj/Error.cpp,
+         server/asobj/LoadVars.cpp, server/asobj/Microphone.cpp,
+         server/asobj/Mouse.cpp, server/asobj/Number.cpp,
+         server/asobj/Selection.cpp, server/asobj/SharedObject.cpp,
+         server/asobj/Stage.h, server/asobj/TextSnapshot.cpp,
+         server/asobj/Video.cpp, server/asobj/gen-asclass.pl,
+         server/asobj/gen-asclass.sh, server/asobj/string.cpp,
+         testsuite/server/GetterSetterTest.cpp:
+         Changed get_text_value interface to return by std::string
+         value. Closes bug #19695.
+       
 2007-04-25  John Gilmore  <address@hidden>
 
        * README, README_CVS:  Improve configuration instructions.

Index: server/array.h
===================================================================
RCS file: /sources/gnash/gnash/server/array.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- server/array.h      4 Apr 2007 10:32:42 -0000       1.24
+++ server/array.h      26 Apr 2007 07:00:29 -0000      1.25
@@ -1,5 +1,5 @@
 // 
-//   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 // 
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -93,10 +93,9 @@
        std::string toString(as_environment* env=NULL) const;
 
        // override from as_object
-       const char* get_text_value() const
+       std::string get_text_value() const
        {
-               _strval = toString();
-               return _strval.c_str();
+               return toString();
        }
 
        unsigned int size() const;
@@ -182,10 +181,6 @@
        // if the string does not refer to an index, or an appropriate int if 
the string does refer to an index
        int index_requested(const std::string& name);
 
-       // Required due to dumb as_object::get_text_value()
-       // method returning by 'const' char *
-       mutable std::string _strval;
-
 };
 
 

Index: server/as_environment.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/as_environment.cpp,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -b -r1.70 -r1.71
--- server/as_environment.cpp   18 Apr 2007 09:35:42 -0000      1.70
+++ server/as_environment.cpp   26 Apr 2007 07:00:29 -0000      1.71
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: as_environment.cpp,v 1.70 2007/04/18 09:35:42 jgilmore Exp $ */
+/* $Id: as_environment.cpp,v 1.71 2007/04/26 07:00:29 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -69,7 +69,7 @@
                            is_slash_based ? "_slashsyntax" : "_dotsyntax",
                            path.c_str(),
                            varname.c_str(),
-                           m_target->get_text_value()
+                           m_target->get_text_value().c_str()
                            );
            );
 
@@ -774,7 +774,7 @@
                {
                        IF_VERBOSE_ASCODING_ERRORS(
                        log_aserror(_("'..' in path '%s' follows a character 
with no parent (%s : %p) (root is %p)"),
-                                       path.c_str(), ch->get_text_value(), ch, 
VM::get().getRoot().get_root_movie());
+                                       path.c_str(), 
ch->get_text_value().c_str(), ch, VM::get().getRoot().get_root_movie());
                        );
                        // if we override env, getvariable.as fails [line 57]
                        //env = ch;

Index: server/as_function.h
===================================================================
RCS file: /sources/gnash/gnash/server/as_function.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- server/as_function.h        20 Mar 2007 17:14:27 -0000      1.13
+++ server/as_function.h        26 Apr 2007 07:00:29 -0000      1.14
@@ -1,5 +1,5 @@
 // 
-//   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 // 
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -116,7 +116,7 @@
 
        /// TODO: check if a user-defined 'toString'
        ///       will be used when available.
-       const char* get_text_value() const
+       std::string get_text_value() const
        {
                return "[type Function]";
        }

Index: server/as_object.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/as_object.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- server/as_object.cpp        18 Apr 2007 09:35:42 -0000      1.48
+++ server/as_object.cpp        26 Apr 2007 07:00:29 -0000      1.49
@@ -583,8 +583,8 @@
 {
        boost::intrusive_ptr<as_object> obj = fn.this_ptr;
 
-       const char* text_val = obj->get_text_value();
-       if ( text_val )
+       std::string text_val = obj->get_text_value();
+       if ( ! text_val.empty() ) // TODO: check if still possible
        {
                return as_value(text_val);
        }

Index: server/as_object.h
===================================================================
RCS file: /sources/gnash/gnash/server/as_object.h,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- server/as_object.h  15 Apr 2007 10:52:09 -0000      1.54
+++ server/as_object.h  26 Apr 2007 07:00:29 -0000      1.55
@@ -123,7 +123,7 @@
        virtual ~as_object() {}
        
        /// Return a text representation for this object
-       virtual const char* get_text_value() const { return "[object Object]"; }
+       virtual std::string get_text_value() const { return "[object Object]"; }
 
        /// Return the numeric value of this object
        //
@@ -131,8 +131,8 @@
        /// to a number, override for a more performant implementation
        ///
        virtual double get_numeric_value() const {
-               const char* txt = get_text_value();
-               if ( txt ) return atof(get_text_value());
+               std::string txt = get_text_value();
+               if ( ! txt.empty() ) return atof(txt.c_str());
                else return 0; 
        }
 

Index: server/character.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/character.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- server/character.cpp        19 Apr 2007 17:41:35 -0000      1.37
+++ server/character.cpp        26 Apr 2007 07:00:29 -0000      1.38
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 // 
 
-/* $Id: character.cpp,v 1.37 2007/04/19 17:41:35 udog Exp $ */
+/* $Id: character.cpp,v 1.38 2007/04/26 07:00:29 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -786,7 +786,7 @@
 }
 
 /*public*/
-const std::string
+std::string
 character::getTargetPath() const
 {
 
@@ -797,7 +797,7 @@
 
 
 /*public*/
-const std::string
+std::string
 character::getTarget() const
 {
 
@@ -822,10 +822,10 @@
 }
 
 /*public*/
-const char*
+std::string
 character::get_text_value() const
 {
-       return getTarget().c_str();
+       return getTarget();
 }
 
 

Index: server/character.h
===================================================================
RCS file: /sources/gnash/gnash/server/character.h,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -b -r1.71 -r1.72
--- server/character.h  20 Apr 2007 15:03:24 -0000      1.71
+++ server/character.h  26 Apr 2007 07:00:29 -0000      1.72
@@ -18,7 +18,7 @@
 //
 //
 
-/* $Id: character.h,v 1.71 2007/04/20 15:03:24 udog Exp $ */
+/* $Id: character.h,v 1.72 2007/04/26 07:00:29 strk Exp $ */
 
 #ifndef GNASH_CHARACTER_H
 #define GNASH_CHARACTER_H
@@ -841,16 +841,16 @@
        //
        /// e.g. "/sprite1/sprite2/ourSprite"
        ///
-       const std::string getTargetPath() const;
+       std::string getTargetPath() const;
 
        /// Return full path to this object, in dot notation
        //
        /// e.g. "_level0.sprite1.sprite2.ourSprite"
        ///
-       const std::string getTarget() const;
+       std::string getTarget() const;
        
   // override from as_object
-       virtual const char* get_text_value() const;     
+       virtual std::string get_text_value() const;     
        
 };
 

Index: server/edit_text_character.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/edit_text_character.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -b -r1.60 -r1.61
--- server/edit_text_character.cpp      19 Apr 2007 14:25:40 -0000      1.60
+++ server/edit_text_character.cpp      26 Apr 2007 07:00:29 -0000      1.61
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: edit_text_character.cpp,v 1.60 2007/04/19 14:25:40 martinwguy Exp $ */
+/* $Id: edit_text_character.cpp,v 1.61 2007/04/26 07:00:29 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -593,7 +593,7 @@
 character*
 edit_text_character::get_topmost_mouse_entity(float x, float y)
 {
-       //log_msg("get_topmost_mouse_entity called on edit_text_character %p, 
labeled '%s'", (void*)this, get_text_value());
+       //log_msg("get_topmost_mouse_entity called on edit_text_character %p, 
labeled '%s'", (void*)this, get_text_value().c_str());
 
        if (get_visible() == false)
        {
@@ -646,7 +646,7 @@
 
 }
 
-const char*
+std::string
 edit_text_character::get_text_value() const
 {
        // we need the const_cast here because registerTextVariable
@@ -657,7 +657,7 @@
        // with a pre-existing value.
        const_cast<edit_text_character*>(this)->registerTextVariable();
 
-       return _text.c_str();
+       return _text;
 }
 
 void

Index: server/edit_text_character.h
===================================================================
RCS file: /sources/gnash/gnash/server/edit_text_character.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- server/edit_text_character.h        18 Apr 2007 13:24:44 -0000      1.29
+++ server/edit_text_character.h        26 Apr 2007 07:00:29 -0000      1.30
@@ -81,7 +81,7 @@
        void    set_text_value(const char* new_text);
 
        /// Return value of our text.
-       const char* get_text_value() const;
+       std::string get_text_value() const;
 
        /// We have a "text" member.
        void set_member(const std::string& name, const as_value& val);

Index: server/asobj/Boolean.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Boolean.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- server/asobj/Boolean.cpp    4 Apr 2007 20:30:45 -0000       1.13
+++ server/asobj/Boolean.cpp    26 Apr 2007 07:00:29 -0000      1.14
@@ -71,7 +71,7 @@
        }
        
        // override from as_object ?
-       //const char* get_text_value() const { return "Boolean"; }
+       //std::string get_text_value() const { return "Boolean"; }
 
        // override from as_object ?
        //double get_numeric_value() const { return 0; }        

Index: server/asobj/Color.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Color.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- server/asobj/Color.cpp      18 Apr 2007 11:00:29 -0000      1.9
+++ server/asobj/Color.cpp      26 Apr 2007 07:00:29 -0000      1.10
@@ -68,7 +68,7 @@
        {}
 
        // override from as_object ?
-       //const char* get_text_value() const { return "Color"; }
+       //std::string get_text_value() const { return "Color"; }
 
        // override from as_object ?
        //double get_numeric_value() const { return 0; }

Index: server/asobj/ContextMenu.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/ContextMenu.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- server/asobj/ContextMenu.cpp        18 Apr 2007 11:00:29 -0000      1.12
+++ server/asobj/ContextMenu.cpp        26 Apr 2007 07:00:29 -0000      1.13
@@ -58,7 +58,7 @@
        static void registerConstructor(as_object& global);
 
        // override from as_object ?
-       //const char* get_text_value() const { return "ContextMenu"; }
+       //std::string get_text_value() const { return "ContextMenu"; }
 
        // override from as_object ?
        //double get_numeric_value() const { return 0; }

Index: server/asobj/CustomActions.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/CustomActions.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- server/asobj/CustomActions.cpp      18 Apr 2007 11:00:29 -0000      1.7
+++ server/asobj/CustomActions.cpp      26 Apr 2007 07:00:29 -0000      1.8
@@ -68,7 +68,7 @@
        {}
 
        // override from as_object ?
-       //const char* get_text_value() const { return "CustomActions"; }
+       //std::string get_text_value() const { return "CustomActions"; }
 
        // override from as_object ?
        //double get_numeric_value() const { return 0; }

Index: server/asobj/Error.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Error.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- server/asobj/Error.cpp      18 Apr 2007 11:00:29 -0000      1.8
+++ server/asobj/Error.cpp      26 Apr 2007 07:00:29 -0000      1.9
@@ -64,7 +64,7 @@
        {}
 
        // override from as_object ?
-       //const char* get_text_value() const { return "Error"; }
+       //std::string get_text_value() const { return "Error"; }
 
        // override from as_object ?
        //double get_numeric_value() const { return 0; }

Index: server/asobj/LoadVars.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/LoadVars.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- server/asobj/LoadVars.cpp   21 Apr 2007 21:07:40 -0000      1.23
+++ server/asobj/LoadVars.cpp   26 Apr 2007 07:00:29 -0000      1.24
@@ -102,7 +102,7 @@
        static void attachLoadVarsInterface(as_object& o);
 
        // override from as_object ?
-       //const char* get_text_value() const { return "LoadVars"; }
+       //std::string get_text_value() const { return "LoadVars"; }
 
        // override from as_object ?
        //double get_numeric_value() const { return 0; }

Index: server/asobj/Microphone.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Microphone.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- server/asobj/Microphone.cpp 18 Apr 2007 11:00:29 -0000      1.7
+++ server/asobj/Microphone.cpp 26 Apr 2007 07:00:29 -0000      1.8
@@ -70,7 +70,7 @@
        {}
 
        // override from as_object ?
-       //const char* get_text_value() const { return "Microphone"; }
+       //std::string get_text_value() const { return "Microphone"; }
 
        // override from as_object ?
        //double get_numeric_value() const { return 0; }

Index: server/asobj/Mouse.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Mouse.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- server/asobj/Mouse.cpp      18 Apr 2007 11:00:29 -0000      1.8
+++ server/asobj/Mouse.cpp      26 Apr 2007 07:00:29 -0000      1.9
@@ -68,7 +68,7 @@
        {}
 
        // override from as_object ?
-       //const char* get_text_value() const { return "Mouse"; }
+       //std::string get_text_value() const { return "Mouse"; }
 
        // override from as_object ?
        //double get_numeric_value() const { return 0; }

Index: server/asobj/Number.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Number.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- server/asobj/Number.cpp     18 Apr 2007 11:00:30 -0000      1.28
+++ server/asobj/Number.cpp     26 Apr 2007 07:00:29 -0000      1.29
@@ -1,4 +1,4 @@
-// Number.cpp:  ActionScript Number class, for Gnash.
+/*/ Number.cpp:  ActionScript Number class, for Gnash.
 // 
 //   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 // 
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: Number.cpp,v 1.28 2007/04/18 11:00:30 jgilmore Exp $ */
+/* $Id: Number.cpp,v 1.29 2007/04/26 07:00:29 strk Exp $ */
 
 #include "log.h"
 #include "tu_config.h"
@@ -103,7 +103,7 @@
        }
 
        // override from as_object
-       const char* get_text_value() const
+       std::string get_text_value() const
        {
                number_val_to_str(_val, _str);
                return _str;

Index: server/asobj/Selection.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Selection.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- server/asobj/Selection.cpp  18 Apr 2007 11:00:30 -0000      1.8
+++ server/asobj/Selection.cpp  26 Apr 2007 07:00:29 -0000      1.9
@@ -76,7 +76,7 @@
        {}
 
        // override from as_object ?
-       //const char* get_text_value() const { return "Selection"; }
+       //std::string get_text_value() const { return "Selection"; }
 
        // override from as_object ?
        //double get_numeric_value() const { return 0; }

Index: server/asobj/SharedObject.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/SharedObject.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- server/asobj/SharedObject.cpp       18 Apr 2007 11:00:30 -0000      1.9
+++ server/asobj/SharedObject.cpp       26 Apr 2007 07:00:29 -0000      1.10
@@ -75,7 +75,7 @@
        {}
 
        // override from as_object ?
-       //const char* get_text_value() const { return "SharedObject"; }
+       //std::string get_text_value() const { return "SharedObject"; }
 
        // override from as_object ?
        //double get_numeric_value() const { return 0; }

Index: server/asobj/Stage.h
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Stage.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- server/asobj/Stage.h        29 Mar 2007 12:37:31 -0000      1.6
+++ server/asobj/Stage.h        26 Apr 2007 07:00:29 -0000      1.7
@@ -1,5 +1,5 @@
 // 
-//   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -49,7 +49,7 @@
        Stage();
 
        // override from as_object ?
-       //const char* get_text_value() const { return "Stage"; }
+       //std::string get_text_value() const { return "Stage"; }
 
        // override from as_object ?
        //double get_numeric_value() const { return 0; }

Index: server/asobj/TextSnapshot.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/TextSnapshot.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- server/asobj/TextSnapshot.cpp       18 Apr 2007 14:07:32 -0000      1.8
+++ server/asobj/TextSnapshot.cpp       26 Apr 2007 07:00:29 -0000      1.9
@@ -79,7 +79,7 @@
        {}
 
        // override from as_object ?
-       //const char* get_text_value() const { return "TextSnapshot"; }
+       //std::string get_text_value() const { return "TextSnapshot"; }
 
        // override from as_object ?
        //double get_numeric_value() const { return 0; }

Index: server/asobj/Video.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/Video.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- server/asobj/Video.cpp      18 Apr 2007 14:07:32 -0000      1.9
+++ server/asobj/Video.cpp      26 Apr 2007 07:00:29 -0000      1.10
@@ -64,7 +64,7 @@
        {}
 
        // override from as_object ?
-       //const char* get_text_value() const { return "Video"; }
+       //std::string get_text_value() const { return "Video"; }
 
        // override from as_object ?
        //double get_numeric_value() const { return 0; }

Index: server/asobj/gen-asclass.pl
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/gen-asclass.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- server/asobj/gen-asclass.pl 18 Apr 2007 14:07:32 -0000      1.3
+++ server/asobj/gen-asclass.pl 26 Apr 2007 07:00:29 -0000      1.4
@@ -182,7 +182,7 @@
        {}
 
        // override from as_object ?
-       //const char* get_text_value() const { return "$args{class}"; }
+       //std::string get_text_value() const { return "$args{class}"; }
 
        // override from as_object ?
        //double get_numeric_value() const { return 0; }

Index: server/asobj/gen-asclass.sh
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/gen-asclass.sh,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- server/asobj/gen-asclass.sh 18 Apr 2007 14:07:32 -0000      1.12
+++ server/asobj/gen-asclass.sh 26 Apr 2007 07:00:29 -0000      1.13
@@ -196,7 +196,7 @@
        {}
 
        // override from as_object ?
-       //const char* get_text_value() const { return "${asname}"; }
+       //std::string get_text_value() const { return "${asname}"; }
 
        // override from as_object ?
        //double get_numeric_value() const { return 0; }

Index: server/asobj/string.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/string.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- server/asobj/string.cpp     19 Apr 2007 10:27:09 -0000      1.30
+++ server/asobj/string.cpp     26 Apr 2007 07:00:29 -0000      1.31
@@ -15,7 +15,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: string.cpp,v 1.30 2007/04/19 10:27:09 strk Exp $ */
+/* $Id: string.cpp,v 1.31 2007/04/26 07:00:29 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -114,15 +114,15 @@
             as_object(getStringInterface())
     {}
 
-    const char* get_text_value() const
+    std::string get_text_value() const
     {
-        return _string.c_str();
+        return _string;
     }
 
     as_value get_primitive_value() const
 
     {
-        return as_value(_string.c_str());
+        return as_value(_string);
     }
 
     std::string& str()

Index: testsuite/server/GetterSetterTest.cpp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/server/GetterSetterTest.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- testsuite/server/GetterSetterTest.cpp       16 Apr 2007 18:23:06 -0000      
1.10
+++ testsuite/server/GetterSetterTest.cpp       26 Apr 2007 07:00:29 -0000      
1.11
@@ -42,7 +42,7 @@
 {
        boost::intrusive_ptr<as_object> o = fn.this_ptr;
        assert(fn.nargs == 0);
-       const char* txt = o->get_text_value();
+       std::string txt = o->get_text_value();
        return as_value(txt);
 }
 
@@ -67,7 +67,8 @@
 
        const string& getText() const { return textval; }
 
-       const char* get_text_value() const { return textval.c_str(); }
+       std::string get_text_value() const { return textval; }
+
        void set_member(const std::string& , const as_value& val )
        {
                textval = val.to_string();




reply via email to

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