gnash-commit
[Top][All Lists]
Advanced

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

Re: [Gnash-commit] gnash ChangeLog server/as_value.cpp server/as_v...


From: Udo Giacomozzi
Subject: Re: [Gnash-commit] gnash ChangeLog server/as_value.cpp server/as_v...
Date: Fri, 9 Mar 2007 18:13:59 +0100

Hello Sandro,

  don't know if it's due to this patch, but the FileIO extension
  doesn't work anymore.

  When compiling I get lots of these messages:

fileio.cpp: In function `void gnash::attachInterface(gnash::as_object*)':
fileio.cpp:77: warning: the address of `void gnash::fileio_fopen(const
   gnash::fn_call&)', will always be `true'

  and FileIO stopped working (they are no-ops). Can you fix this
  please (I don't know what's going on, so...)? This is a critical
  extension for me...

Udo
  

Friday, March 9, 2007, 4:19:27 PM, you wrote:

SS> CVSROOT:        /sources/gnash
SS> Module name:    gnash
SS> Changes by:     Sandro Santilli <strk>  07/03/09 15:19:26

SS> Modified files:
SS>         .              : ChangeLog 
SS>         server         : as_value.cpp as_value.h 
SS>         server/vm      : ASHandlers.cpp action.cpp 

SS> Log message:
SS>                 * server/as_value.{cpp,h}, server/vm/ASHandlers.cpp,
SS>                   server/vm/action.cpp: Drop C_FUNCTION as_value type.
SS>                   WARNING: attempts to initialize as_values with
SS>                   a function pointer will now result in BOOLEAN values !!
SS>                   The compiler will warn you about this, but make sure
SS>                   you enable warnings.

SS> CVSWeb URLs:
SS> 
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2592&r2=1.2593
SS> 
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_value.cpp?cvsroot=gnash&r1=1.23&r2=1.24
SS> 
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_value.h?cvsroot=gnash&r1=1.28&r2=1.29
SS> 
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.cpp?cvsroot=gnash&r1=1.59&r2=1.60
SS> 
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/action.cpp?cvsroot=gnash&r1=1.8&r2=1.9

SS> Patches:
SS> Index: ChangeLog
SS> ===================================================================
SS> RCS file: /sources/gnash/gnash/ChangeLog,v
SS> retrieving revision 1.2592
SS> retrieving revision 1.2593
SS> diff -u -b -r1.2592 -r1.2593
SS> --- ChangeLog   9 Mar 2007 15:12:08 -0000       1.2592
SS> +++ ChangeLog   9 Mar 2007 15:19:26 -0000       1.2593
SS> @@ -1,5 +1,11 @@
SS>  2007-03-09 Sandro Santilli <address@hidden>
SS>  
SS> +       * server/as_value.{cpp,h}, server/vm/ASHandlers.cpp,
SS> +         server/vm/action.cpp: Drop C_FUNCTION as_value type.
SS> +         WARNING: attempts to initialize as_values with
SS> +         a function pointer will now result in BOOLEAN values !!
SS> +         The compiler will warn you about this, but make sure
SS> +         you enable warnings.
SS>         * server/: sprite_instance.cpp, textformat.cpp,
SS>           video_stream_instance.cpp, edit_text_character.cpp:
SS>           Use builtin_function for function as_values.

SS> Index: server/as_value.cpp
SS> ===================================================================
SS> RCS file: /sources/gnash/gnash/server/as_value.cpp,v
SS> retrieving revision 1.23
SS> retrieving revision 1.24
SS> diff -u -b -r1.23 -r1.24
SS> --- server/as_value.cpp 7 Mar 2007 19:46:46 -0000       1.23
SS> +++ server/as_value.cpp 9 Mar 2007 15:19:26 -0000       1.24
SS> @@ -182,11 +182,13 @@
SS>                         }
SS>                         break;
SS>  
SS> +#ifdef ALLOW_C_FUNCTION_VALUES
SS>                 case C_FUNCTION:
SS>                         snprintf(buffer, 50, "<c_function %p>",
SS>                                 (const void *) &m_c_function_value);
SS>                         m_string_value = buffer;
SS>                         break;
SS> +#endif
SS>  
SS>                 case AS_FUNCTION:
SS>                         snprintf(buffer, 50, "<as_function %p>",
SS> @@ -234,7 +236,9 @@
SS>                 case BOOLEAN:
SS>                 case STRING:
SS>                 case NUMBER:
SS> +#ifdef ALLOW_C_FUNCTION_VALUES
SS>                 case C_FUNCTION:
SS> +#endif
SS>                 default:
SS>                         return *this;
SS>         }
SS> @@ -317,8 +321,10 @@
SS>         return this->m_boolean_value;
SS>      } else if (m_type == OBJECT) {
SS>         return m_object_value != NULL;
SS> +#ifdef ALLOW_C_FUNCTION_VALUES
SS>      } else if (m_type == C_FUNCTION) {
SS>         return m_c_function_value != NULL;
SS> +#endif
SS>      } else if (m_type == AS_FUNCTION) {
SS>         return m_as_function_value != NULL;
SS>      } else if (m_type == MOVIECLIP) {
SS> @@ -395,6 +401,7 @@
SS>         m_string_value = path.c_str();
SS>  }
SS>  
SS> +#ifdef ALLOW_C_FUNCTION_VALUES
SS>  as_c_function_ptr
SS>  as_value::to_c_function() const
SS>      // Return value as a C function ptr.  Returns NULL if value is
SS> @@ -407,6 +414,7 @@
SS>         return NULL;
SS>      }
SS>  }
SS> +#endif
SS>  
SS>  // Return value as an ActionScript function.  Returns NULL if value is
SS>  // not an ActionScript function.
SS> @@ -503,12 +511,14 @@
SS>      {
SS>         return this_nulltype == v_nulltype;
SS>      }
SS> +#ifdef ALLOW_C_FUNCTION_VALUES
SS>      else if (m_type == C_FUNCTION || v.m_type == C_FUNCTION)
SS>      {
SS>         // a C_FUNCTION is only equal to itself
SS>         return m_type == v.m_type
SS>                 && m_c_function_value == v.m_c_function_value;
SS>      }
SS> +#endif
SS>      else if (m_type == STRING)
SS>      {
SS>         return m_string_value == v.to_tu_string();
SS> @@ -604,7 +614,9 @@
SS>                         return "null";
SS>  
SS>                 case as_value::AS_FUNCTION:
SS> +#ifdef ALLOW_C_FUNCTION_VALUES
SS>                 case as_value::C_FUNCTION:
SS> +#endif
SS>                         return "function";
SS>  
SS>                 default:

SS> Index: server/as_value.h
SS> ===================================================================
SS> RCS file: /sources/gnash/gnash/server/as_value.h,v
SS> retrieving revision 1.28
SS> retrieving revision 1.29
SS> diff -u -b -r1.28 -r1.29
SS> --- server/as_value.h   4 Mar 2007 02:22:00 -0000       1.28
SS> +++ server/as_value.h   9 Mar 2007 15:19:26 -0000       1.29
SS> @@ -14,7 +14,7 @@
SS>  // along with this program; if not, write to the Free Software
SS>  // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  
USA
SS>  
SS> -/* $Id: as_value.h,v 1.28 2007/03/04 02:22:00 strk Exp $ */
SS> +/* $Id: as_value.h,v 1.29 2007/03/09 15:19:26 strk Exp $ */
SS>  
SS>  #ifndef GNASH_AS_VALUE_H
SS>  #define GNASH_AS_VALUE_H
SS> @@ -64,7 +64,7 @@
SS>         static inline int isinf_ld (long double x) { return isnan (x - x); }
SS>  #endif
SS>   
SS> -#define ALLOW_C_FUNCTION_VALUES
SS> +//#define ALLOW_C_FUNCTION_VALUES
SS>  
SS>  //#ifdef ALLOW_C_FUNCTION_VALUES
SS>  typedef void (*as_c_function_ptr)(const fn_call& fn);

SS> Index: server/vm/ASHandlers.cpp
SS> ===================================================================
SS> RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v
SS> retrieving revision 1.59
SS> retrieving revision 1.60
SS> diff -u -b -r1.59 -r1.60
SS> --- server/vm/ASHandlers.cpp    9 Mar 2007 10:39:11 -0000       1.59
SS> +++ server/vm/ASHandlers.cpp    9 Mar 2007 15:19:26 -0000       1.60
SS> @@ -14,7 +14,7 @@
SS>  // along with this program; if not, write to the Free Software
SS>  // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  
USA
SS>  
SS> -/* $Id: ASHandlers.cpp,v 1.59 2007/03/09 10:39:11 strk Exp $ */
SS> +/* $Id: ASHandlers.cpp,v 1.60 2007/03/09 15:19:26 strk Exp $ */
SS>  
SS>  #ifdef HAVE_CONFIG_H
SS>  #include "config.h"
SS> @@ -93,6 +93,7 @@
SS>  
SS>      as_value new_obj;
SS>  
SS> +#if 0 // C_FUNCTION values do not exist anymore !
SS>      if ( constructor.is_c_function() )
SS>      {
SS>          IF_VERBOSE_ACTION (
SS> @@ -104,8 +105,10 @@
SS>  
SS>          (constructor.to_c_function())(call);
SS>      }
SS> +    else
SS> +#endif // C_FUNCTION values do not exist anymore !
SS>  
SS> -    else if (as_function* ctor_as_func = constructor.to_as_function())
SS> +    if (as_function* ctor_as_func = constructor.to_as_function())
SS>      {
SS>          // This function is being used as a constructor; make sure
SS>          // it has a prototype object.

SS> Index: server/vm/action.cpp
SS> ===================================================================
SS> RCS file: /sources/gnash/gnash/server/vm/action.cpp,v
SS> retrieving revision 1.8
SS> retrieving revision 1.9
SS> diff -u -b -r1.8 -r1.9
SS> --- server/vm/action.cpp        27 Feb 2007 09:10:20 -0000      1.8
SS> +++ server/vm/action.cpp        9 Mar 2007 15:19:26 -0000       1.9
SS> @@ -230,12 +230,15 @@
SS>  
SS>         try 
SS>         {
SS> +#if 0 // C_FUNCTION values do not exist anymore !
SS>                 if ( as_c_function_ptr func = method.to_c_function() )
SS>                 {
SS>                     // It's a C function.  Call it.
SS>                     (*func)(call);
SS>                 }
SS> -               else if ( as_function* as_func = method.to_as_function() )
SS> +               else
SS> +#endif // C_FUNCTION values do not exist anymore !
SS> +               if ( as_function* as_func = method.to_as_function() )
SS>                 {
SS>                     // It's an ActionScript function.  Call it.
SS>                     (*as_func)(call);


SS> _______________________________________________
SS> Gnash-commit mailing list
SS> address@hidden
SS> http://lists.gnu.org/mailman/listinfo/gnash-commit



Udo





reply via email to

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