[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/as_value.cpp server/as_v...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/as_value.cpp server/as_v... |
Date: |
Fri, 09 Mar 2007 15:19:27 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/03/09 15:19:26
Modified files:
. : ChangeLog
server : as_value.cpp as_value.h
server/vm : ASHandlers.cpp action.cpp
Log message:
* server/as_value.{cpp,h}, server/vm/ASHandlers.cpp,
server/vm/action.cpp: Drop C_FUNCTION as_value type.
WARNING: attempts to initialize as_values with
a function pointer will now result in BOOLEAN values !!
The compiler will warn you about this, but make sure
you enable warnings.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2592&r2=1.2593
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_value.cpp?cvsroot=gnash&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_value.h?cvsroot=gnash&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.cpp?cvsroot=gnash&r1=1.59&r2=1.60
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/action.cpp?cvsroot=gnash&r1=1.8&r2=1.9
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2592
retrieving revision 1.2593
diff -u -b -r1.2592 -r1.2593
--- ChangeLog 9 Mar 2007 15:12:08 -0000 1.2592
+++ ChangeLog 9 Mar 2007 15:19:26 -0000 1.2593
@@ -1,5 +1,11 @@
2007-03-09 Sandro Santilli <address@hidden>
+ * server/as_value.{cpp,h}, server/vm/ASHandlers.cpp,
+ server/vm/action.cpp: Drop C_FUNCTION as_value type.
+ WARNING: attempts to initialize as_values with
+ a function pointer will now result in BOOLEAN values !!
+ The compiler will warn you about this, but make sure
+ you enable warnings.
* server/: sprite_instance.cpp, textformat.cpp,
video_stream_instance.cpp, edit_text_character.cpp:
Use builtin_function for function as_values.
Index: server/as_value.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/as_value.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- server/as_value.cpp 7 Mar 2007 19:46:46 -0000 1.23
+++ server/as_value.cpp 9 Mar 2007 15:19:26 -0000 1.24
@@ -182,11 +182,13 @@
}
break;
+#ifdef ALLOW_C_FUNCTION_VALUES
case C_FUNCTION:
snprintf(buffer, 50, "<c_function %p>",
(const void *) &m_c_function_value);
m_string_value = buffer;
break;
+#endif
case AS_FUNCTION:
snprintf(buffer, 50, "<as_function %p>",
@@ -234,7 +236,9 @@
case BOOLEAN:
case STRING:
case NUMBER:
+#ifdef ALLOW_C_FUNCTION_VALUES
case C_FUNCTION:
+#endif
default:
return *this;
}
@@ -317,8 +321,10 @@
return this->m_boolean_value;
} else if (m_type == OBJECT) {
return m_object_value != NULL;
+#ifdef ALLOW_C_FUNCTION_VALUES
} else if (m_type == C_FUNCTION) {
return m_c_function_value != NULL;
+#endif
} else if (m_type == AS_FUNCTION) {
return m_as_function_value != NULL;
} else if (m_type == MOVIECLIP) {
@@ -395,6 +401,7 @@
m_string_value = path.c_str();
}
+#ifdef ALLOW_C_FUNCTION_VALUES
as_c_function_ptr
as_value::to_c_function() const
// Return value as a C function ptr. Returns NULL if value is
@@ -407,6 +414,7 @@
return NULL;
}
}
+#endif
// Return value as an ActionScript function. Returns NULL if value is
// not an ActionScript function.
@@ -503,12 +511,14 @@
{
return this_nulltype == v_nulltype;
}
+#ifdef ALLOW_C_FUNCTION_VALUES
else if (m_type == C_FUNCTION || v.m_type == C_FUNCTION)
{
// a C_FUNCTION is only equal to itself
return m_type == v.m_type
&& m_c_function_value == v.m_c_function_value;
}
+#endif
else if (m_type == STRING)
{
return m_string_value == v.to_tu_string();
@@ -604,7 +614,9 @@
return "null";
case as_value::AS_FUNCTION:
+#ifdef ALLOW_C_FUNCTION_VALUES
case as_value::C_FUNCTION:
+#endif
return "function";
default:
Index: server/as_value.h
===================================================================
RCS file: /sources/gnash/gnash/server/as_value.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- server/as_value.h 4 Mar 2007 02:22:00 -0000 1.28
+++ server/as_value.h 9 Mar 2007 15:19:26 -0000 1.29
@@ -14,7 +14,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: as_value.h,v 1.28 2007/03/04 02:22:00 strk Exp $ */
+/* $Id: as_value.h,v 1.29 2007/03/09 15:19:26 strk Exp $ */
#ifndef GNASH_AS_VALUE_H
#define GNASH_AS_VALUE_H
@@ -64,7 +64,7 @@
static inline int isinf_ld (long double x) { return isnan (x - x); }
#endif
-#define ALLOW_C_FUNCTION_VALUES
+//#define ALLOW_C_FUNCTION_VALUES
//#ifdef ALLOW_C_FUNCTION_VALUES
typedef void (*as_c_function_ptr)(const fn_call& fn);
Index: server/vm/ASHandlers.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -b -r1.59 -r1.60
--- server/vm/ASHandlers.cpp 9 Mar 2007 10:39:11 -0000 1.59
+++ server/vm/ASHandlers.cpp 9 Mar 2007 15:19:26 -0000 1.60
@@ -14,7 +14,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: ASHandlers.cpp,v 1.59 2007/03/09 10:39:11 strk Exp $ */
+/* $Id: ASHandlers.cpp,v 1.60 2007/03/09 15:19:26 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -93,6 +93,7 @@
as_value new_obj;
+#if 0 // C_FUNCTION values do not exist anymore !
if ( constructor.is_c_function() )
{
IF_VERBOSE_ACTION (
@@ -104,8 +105,10 @@
(constructor.to_c_function())(call);
}
+ else
+#endif // C_FUNCTION values do not exist anymore !
- else if (as_function* ctor_as_func = constructor.to_as_function())
+ if (as_function* ctor_as_func = constructor.to_as_function())
{
// This function is being used as a constructor; make sure
// it has a prototype object.
Index: server/vm/action.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/action.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- server/vm/action.cpp 27 Feb 2007 09:10:20 -0000 1.8
+++ server/vm/action.cpp 9 Mar 2007 15:19:26 -0000 1.9
@@ -230,12 +230,15 @@
try
{
+#if 0 // C_FUNCTION values do not exist anymore !
if ( as_c_function_ptr func = method.to_c_function() )
{
// It's a C function. Call it.
(*func)(call);
}
- else if ( as_function* as_func = method.to_as_function() )
+ else
+#endif // C_FUNCTION values do not exist anymore !
+ if ( as_function* as_func = method.to_as_function() )
{
// It's an ActionScript function. Call it.
(*as_func)(call);