[Swfdec-commits] 13 commits - swfdec-gtk/swfdec_gtk_widget.c swfdec/swfdec_as_array.c swfdec/swfdec_as_boolean.c swfdec/swfdec_asbroadcaster.c swfdec/swfdec_as_context.c swfdec/swfdec_as_date.c swfdec/swfdec_as_function.c swfdec/swfdec_as_interpret.c swfdec/swfdec_as_native_function.c swfdec/swfdec_as_number.c swfdec/swfdec_as_object.c swfdec/swfdec_as_string.c swfdec/swfdec_as_types.c swfdec/swfdec_as_types.h swfdec/swfdec_audio.c swfdec/swfdec_bitmap_data.c swfdec/swfdec_button.c swfdec/swfdec_color_as.c swfdec/swfdec_color_matrix_filter_as.c swfdec/swfdec_interval.c swfdec/swfdec_key_as.c swfdec/swfdec_load_object_as.c swfdec/swfdec_movie_as_drawing.c swfdec/swfdec_movie_asprops.c swfdec/swfdec_net_stream_as.c swfdec/swfdec_player_as.c swfdec/swfdec_player.c swfdec/swfdec_selection.c swfdec/swfdec_sound_object.c swfdec/swfdec_sprite_movie_as.c swfdec/swfdec_sprite_movie.c swfdec/swfdec_text_field_movie_as.c swfdec/swfdec_text_field_movie.c swfdec/swfdec_text_format.c swfdec/swfdec_utils.c swfdec/swfdec_xml.c test/swfdec_test_buffer.c vivified/code

Benjamin Otte company at kemper.freedesktop.org
Thu Nov 6 05:14:13 PST 2008


 swfdec-gtk/swfdec_gtk_widget.c          |    4 
 swfdec/swfdec_as_array.c                |   28 +++---
 swfdec/swfdec_as_boolean.c              |    2 
 swfdec/swfdec_as_context.c              |    8 -
 swfdec/swfdec_as_date.c                 |   10 +-
 swfdec/swfdec_as_function.c             |    2 
 swfdec/swfdec_as_interpret.c            |  134 +++++++++++++++-----------------
 swfdec/swfdec_as_native_function.c      |    8 -
 swfdec/swfdec_as_number.c               |    2 
 swfdec/swfdec_as_object.c               |    8 -
 swfdec/swfdec_as_string.c               |   18 ++--
 swfdec/swfdec_as_types.c                |   52 ++++++------
 swfdec/swfdec_as_types.h                |   10 +-
 swfdec/swfdec_asbroadcaster.c           |    4 
 swfdec/swfdec_audio.c                   |    2 
 swfdec/swfdec_bitmap_data.c             |   12 +-
 swfdec/swfdec_button.c                  |    6 -
 swfdec/swfdec_color_as.c                |    4 
 swfdec/swfdec_color_matrix_filter_as.c  |    2 
 swfdec/swfdec_interval.c                |    2 
 swfdec/swfdec_key_as.c                  |    2 
 swfdec/swfdec_load_object_as.c          |    2 
 swfdec/swfdec_movie_as_drawing.c        |   30 +++----
 swfdec/swfdec_movie_asprops.c           |   18 ++--
 swfdec/swfdec_net_stream_as.c           |    2 
 swfdec/swfdec_player.c                  |    4 
 swfdec/swfdec_player_as.c               |    6 -
 swfdec/swfdec_selection.c               |    2 
 swfdec/swfdec_sound_object.c            |    8 -
 swfdec/swfdec_sprite_movie.c            |    2 
 swfdec/swfdec_sprite_movie_as.c         |   16 +--
 swfdec/swfdec_text_field_movie.c        |    1 
 swfdec/swfdec_text_field_movie_as.c     |   44 +++++-----
 swfdec/swfdec_text_format.c             |   34 ++++----
 swfdec/swfdec_utils.c                   |   12 +-
 swfdec/swfdec_xml.c                     |    6 -
 test/swfdec_test_buffer.c               |    2 
 vivified/code/vivi_parser_scanner_lex.l |    3 
 38 files changed, 256 insertions(+), 256 deletions(-)

New commits:
commit 7945896a2f07f9fdb39ee5184d2ae53dfdae7d95
Author: Benjamin Otte <otte at gnome.org>
Date:   Thu Nov 6 13:54:19 2008 +0100

    remove *& occurances again

diff --git a/swfdec/swfdec_as_array.c b/swfdec/swfdec_as_array.c
index afcbbd2..3aefeea 100644
--- a/swfdec/swfdec_as_array.c
+++ b/swfdec/swfdec_as_array.c
@@ -76,7 +76,7 @@ swfdec_as_array_length_as_integer (SwfdecAsObject *object)
   g_return_val_if_fail (object != NULL, 0);
 
   swfdec_as_object_get_variable (object, SWFDEC_AS_STR_length, &val);
-  length = swfdec_as_value_to_integer (object->context, *&val);
+  length = swfdec_as_value_to_integer (object->context, val);
 
   return length;
 }
@@ -751,7 +751,7 @@ swfdec_as_array_slice (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc,
   length = swfdec_as_array_get_length (object);
 
   if (argc > 0) {
-    start_index = swfdec_as_value_to_integer (cx, *&argv[0]);
+    start_index = swfdec_as_value_to_integer (cx, argv[0]);
     if (start_index < 0)
       start_index = length + start_index;
     start_index = CLAMP (start_index, 0, length);
@@ -760,7 +760,7 @@ swfdec_as_array_slice (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc,
   }
 
   if (argc > 1) {
-    gint32 endIndex = swfdec_as_value_to_integer (cx, *&argv[1]);
+    gint32 endIndex = swfdec_as_value_to_integer (cx, argv[1]);
     if (endIndex < 0)
       endIndex = length + endIndex;
     endIndex = CLAMP (endIndex, start_index, length);
@@ -789,13 +789,13 @@ swfdec_as_array_splice (SwfdecAsContext *cx, SwfdecAsObject *object,
 
   length = swfdec_as_array_get_length (object);
 
-  start_index = swfdec_as_value_to_integer (cx, *&argv[0]);
+  start_index = swfdec_as_value_to_integer (cx, argv[0]);
   if (start_index < 0)
     start_index = length + start_index;
   start_index = CLAMP (start_index, 0, length);
 
   if (argc > 1) {
-    int tmp = swfdec_as_value_to_integer (cx, *&argv[1]);
+    int tmp = swfdec_as_value_to_integer (cx, argv[1]);
     if (tmp < 0)
       return;
     num_remove = MIN (tmp, length - start_index);
@@ -860,7 +860,7 @@ swfdec_as_array_sort_compare_values (SwfdecAsContext *cx,
     SwfdecAsValue argv[2] = { *a, *b };
     SwfdecAsValue ret;
     swfdec_as_function_call (custom_function, NULL, 2, argv, &ret);
-    retval = swfdec_as_value_to_integer (cx, *&ret);
+    retval = swfdec_as_value_to_integer (cx, ret);
   }
   else if (options & SORT_OPTION_NUMERIC &&
       (SWFDEC_AS_VALUE_IS_NUMBER (*a) ||
@@ -1185,7 +1185,7 @@ swfdec_as_array_sort (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc,
   }
 
   if (argc > pos) {
-    options = swfdec_as_value_to_integer (cx, *&argv[pos]) & MASK_SORT_OPTION;
+    options = swfdec_as_value_to_integer (cx, argv[pos]) & MASK_SORT_OPTION;
   } else {
     options = 0;
   }
@@ -1252,12 +1252,12 @@ swfdec_as_array_sortOn (SwfdecAsContext *cx, SwfdecAsObject *object,
 	for (i = 0; i < num_fields; i++) {
 	  swfdec_as_array_get_value (array, i, &val);
 	  options[i] =
-	    swfdec_as_value_to_integer (cx, *&val) & MASK_SORT_OPTION;
+	    swfdec_as_value_to_integer (cx, val) & MASK_SORT_OPTION;
 	}
       }
     } else {
       options[0] =
-	swfdec_as_value_to_integer (cx, *&argv[1]) & MASK_SORT_OPTION;
+	swfdec_as_value_to_integer (cx, argv[1]) & MASK_SORT_OPTION;
       for (i = 1; i < num_fields; i++) {
 	options[i] = options[0];
       }
@@ -1285,7 +1285,7 @@ swfdec_as_array_construct (SwfdecAsContext *cx, SwfdecAsObject *object,
   object->array = TRUE;
 
   if (argc == 1 && SWFDEC_AS_VALUE_IS_NUMBER (argv[0])) {
-    int l = swfdec_as_value_to_integer (cx, *&argv[0]);
+    int l = swfdec_as_value_to_integer (cx, argv[0]);
     swfdec_as_array_set_length (object, l < 0 ? 0 : l);
   } else if (argc > 0) {
     swfdec_as_array_append (object, argc, argv);
diff --git a/swfdec/swfdec_as_context.c b/swfdec/swfdec_as_context.c
index 758f958..d5e163f 100644
--- a/swfdec/swfdec_as_context.c
+++ b/swfdec/swfdec_as_context.c
@@ -1085,8 +1085,8 @@ swfdec_as_context_ASSetPropFlags (SwfdecAsContext *cx, SwfdecAsObject *object,
   if (!SWFDEC_AS_VALUE_IS_COMPOSITE (argv[0]))
     return;
   obj = SWFDEC_AS_VALUE_GET_COMPOSITE (argv[0]);
-  flags[0] = swfdec_as_value_to_integer (cx, *&argv[2]);
-  flags[1] = (argc > 3) ? swfdec_as_value_to_integer (cx, *&argv[3]) : 0;
+  flags[0] = swfdec_as_value_to_integer (cx, argv[2]);
+  flags[1] = (argc > 3) ? swfdec_as_value_to_integer (cx, argv[3]) : 0;
 
   if (flags[0] == 0 && flags[1] == 0) {
     // we should add autosizing length attribute here
@@ -1118,7 +1118,7 @@ swfdec_as_context_isFinite (SwfdecAsContext *cx, SwfdecAsObject *object,
   if (argc < 1)
     return;
 
-  d = swfdec_as_value_to_number (cx, *&argv[0]);
+  d = swfdec_as_value_to_number (cx, argv[0]);
   SWFDEC_AS_VALUE_SET_BOOLEAN (retval, isfinite (d) ? TRUE : FALSE);
 }
 
@@ -1132,7 +1132,7 @@ swfdec_as_context_isNaN (SwfdecAsContext *cx, SwfdecAsObject *object,
   if (argc < 1)
     return;
 
-  d = swfdec_as_value_to_number (cx, *&argv[0]);
+  d = swfdec_as_value_to_number (cx, argv[0]);
   SWFDEC_AS_VALUE_SET_BOOLEAN (retval, isnan (d) ? TRUE : FALSE);
 }
 
diff --git a/swfdec/swfdec_as_date.c b/swfdec/swfdec_as_date.c
index ef738de..1f23e09 100644
--- a/swfdec/swfdec_as_date.c
+++ b/swfdec/swfdec_as_date.c
@@ -444,7 +444,7 @@ swfdec_as_date_set_field (SwfdecAsContext *cx, SwfdecAsObject *object,
   SWFDEC_AS_CHECK (SWFDEC_TYPE_AS_DATE, &date, "");
 
   if (!swfdec_as_date_is_valid (date))
-    swfdec_as_value_to_number (cx, *&argv[0]); // calls valueOf
+    swfdec_as_value_to_number (cx, argv[0]); // calls valueOf
 
   if (swfdec_as_date_is_valid (date) && argc > 0)
   {
@@ -764,7 +764,7 @@ swfdec_as_date_setTime (SwfdecAsContext *cx, SwfdecAsObject *object,
 
   if (argc > 0 &&
       (cx->version > 6 || !SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]))) {
-    d = swfdec_as_value_to_number (cx, *&argv[0]);
+    d = swfdec_as_value_to_number (cx, argv[0]);
   } else {
     d = NAN;
   }
@@ -1096,7 +1096,7 @@ swfdec_as_date_construct (SwfdecAsContext *cx, SwfdecAsObject *object,
   else if (argc == 1) // milliseconds from epoch, local
   {
     // need to save directly to keep fractions of a milliseconds
-    date->milliseconds = swfdec_as_value_to_number (cx, *&argv[0]);
+    date->milliseconds = swfdec_as_value_to_number (cx, argv[0]);
   }
   else // year, month etc. local
   {
diff --git a/swfdec/swfdec_as_function.c b/swfdec/swfdec_as_function.c
index 99c8d9a..e51f27c 100644
--- a/swfdec/swfdec_as_function.c
+++ b/swfdec/swfdec_as_function.c
@@ -146,7 +146,7 @@ swfdec_as_function_apply (SwfdecAsContext *cx, SwfdecAsObject *object,
     array = SWFDEC_AS_VALUE_GET_COMPOSITE (argv[1]);
 
     swfdec_as_object_get_variable (array, SWFDEC_AS_STR_length, &val);
-    length = swfdec_as_value_to_integer (cx, *&val);
+    length = swfdec_as_value_to_integer (cx, val);
 
     if (length > 0) {
       /* FIXME: find a smarter way to do this, like providing argv not as an array */
diff --git a/swfdec/swfdec_as_interpret.c b/swfdec/swfdec_as_interpret.c
index 29cf113..f2769c4 100644
--- a/swfdec/swfdec_as_interpret.c
+++ b/swfdec/swfdec_as_interpret.c
@@ -1458,12 +1458,12 @@ swfdec_action_equals2_5 (SwfdecAsContext *cx, guint action, const guint8 *data,
   if (SWFDEC_AS_VALUE_IS_OBJECT (ltmp)) {
     l = swfdec_as_value_to_number (cx, *lval);
   } else {
-    l = swfdec_as_value_to_number (cx, *&ltmp);
+    l = swfdec_as_value_to_number (cx, ltmp);
   }
   if (SWFDEC_AS_VALUE_IS_OBJECT (rtmp)) {
     r = swfdec_as_value_to_number (cx, *rval);
   } else {
-    r = swfdec_as_value_to_number (cx, *&rtmp);
+    r = swfdec_as_value_to_number (cx, rtmp);
   }
 
   /* get rid of undefined and null */
diff --git a/swfdec/swfdec_as_native_function.c b/swfdec/swfdec_as_native_function.c
index 18aa856..e827066 100644
--- a/swfdec/swfdec_as_native_function.c
+++ b/swfdec/swfdec_as_native_function.c
@@ -331,7 +331,7 @@ swfdec_as_native_function_checkv (SwfdecAsContext *cx, SwfdecAsObject *object,
       case 'i':
 	{
 	  int *j = va_arg (varargs, int *);
-	  *j = swfdec_as_value_to_integer (cx, *&argv[i]);
+	  *j = swfdec_as_value_to_integer (cx, argv[i]);
 	}
 	break;
       case 'm':
@@ -352,7 +352,7 @@ swfdec_as_native_function_checkv (SwfdecAsContext *cx, SwfdecAsObject *object,
       case 'n':
 	{
 	  double *d = va_arg (varargs, double *);
-	  *d = swfdec_as_value_to_number (cx, *&argv[i]);
+	  *d = swfdec_as_value_to_number (cx, argv[i]);
 	}
 	break;
       case 's':
@@ -365,7 +365,7 @@ swfdec_as_native_function_checkv (SwfdecAsContext *cx, SwfdecAsObject *object,
       case 'O':
 	{
 	  SwfdecAsObject **o = va_arg (varargs, SwfdecAsObject **);
-	  *o = swfdec_as_value_to_object (cx, *&argv[i]);
+	  *o = swfdec_as_value_to_object (cx, argv[i]);
 	  if (*o == NULL && *args != 'O')
 	    return FALSE;
 	}
diff --git a/swfdec/swfdec_as_number.c b/swfdec/swfdec_as_number.c
index 13b27a8..3da13a2 100644
--- a/swfdec/swfdec_as_number.c
+++ b/swfdec/swfdec_as_number.c
@@ -53,7 +53,7 @@ swfdec_as_number_construct (SwfdecAsContext *cx, SwfdecAsObject *object,
   double d;
 
   if (argc > 0) {
-    d = swfdec_as_value_to_number (cx, *&argv[0]);
+    d = swfdec_as_value_to_number (cx, argv[0]);
   } else {
     d = 0;
   }
diff --git a/swfdec/swfdec_as_object.c b/swfdec/swfdec_as_object.c
index 865f185..1aeb8f4 100644
--- a/swfdec/swfdec_as_object.c
+++ b/swfdec/swfdec_as_object.c
@@ -772,7 +772,7 @@ swfdec_as_object_set_variable_and_flags (SwfdecAsObject *object,
       SwfdecAsValue tmp;
       gint32 length;
       swfdec_as_object_get_variable (object, SWFDEC_AS_STR_length, &tmp);
-      length = swfdec_as_value_to_integer (context, *&tmp);
+      length = swfdec_as_value_to_integer (context, tmp);
       if (l >= length) {
 	object->array = FALSE;
 	swfdec_as_value_set_integer (context, &tmp, l + 1);
@@ -1524,7 +1524,7 @@ swfdec_as_object_isPrototypeOf (SwfdecAsContext *cx,
   if (argc < 1)
     return;
 
-  class = swfdec_as_value_to_object (cx, *&argv[0]);
+  class = swfdec_as_value_to_object (cx, argv[0]);
   if (class == NULL)
     return;
 
@@ -1688,7 +1688,7 @@ swfdec_as_object_construct (SwfdecAsContext *cx, SwfdecAsObject *object,
       *ret = argv[0];
       return;
     } else {
-      SwfdecAsObject *result = swfdec_as_value_to_object (cx, *&argv[0]);
+      SwfdecAsObject *result = swfdec_as_value_to_object (cx, argv[0]);
       if (result != NULL) {
 	SWFDEC_AS_VALUE_SET_OBJECT (ret, result);
 	return;
diff --git a/swfdec/swfdec_as_string.c b/swfdec/swfdec_as_string.c
index aac9587..9a28915 100644
--- a/swfdec/swfdec_as_string.c
+++ b/swfdec/swfdec_as_string.c
@@ -92,7 +92,7 @@ swfdec_as_string_lastIndexOf (SwfdecAsContext *cx, SwfdecAsObject *object,
   SWFDEC_AS_STRING_CHECK (&string, "s", &s);
 
   if (argc == 2) {
-    int offset = swfdec_as_value_to_integer (cx, *&argv[1]);
+    int offset = swfdec_as_value_to_integer (cx, argv[1]);
     const char *tmp;
     if (offset < 0) {
       swfdec_as_value_set_integer (cx, ret, -1);
@@ -126,7 +126,7 @@ swfdec_as_string_indexOf (SwfdecAsContext *cx, SwfdecAsObject *object,
   SWFDEC_AS_STRING_CHECK (&string, "s", &s);
 
   if (argc == 2)
-    offset = swfdec_as_value_to_integer (cx, *&argv[1]);
+    offset = swfdec_as_value_to_integer (cx, argv[1]);
   if (offset < 0)
     offset = 0;
   len = g_utf8_strlen (string, -1);
@@ -206,7 +206,7 @@ swfdec_as_string_fromCharCode_5 (SwfdecAsContext *cx, SwfdecAsObject *object,
 
   if (argc > 0) {
     for (i = 0; i < argc; i++) {
-      c = ((guint) swfdec_as_value_to_integer (cx, *&argv[i])) % 65536;
+      c = ((guint) swfdec_as_value_to_integer (cx, argv[i])) % 65536;
       if (c > 255) {
 	append = c / 256;
 	g_byte_array_append (array, &append, 1);
@@ -246,7 +246,7 @@ swfdec_as_string_fromCharCode_6 (SwfdecAsContext *cx, SwfdecAsObject *object,
     chars = g_new (gunichar, argc);
 
   for (i = 0; i < argc; i++) {
-    chars[i] = ((guint) swfdec_as_value_to_integer (cx, *&argv[i])) % 65536;
+    chars[i] = ((guint) swfdec_as_value_to_integer (cx, argv[i])) % 65536;
   }
 
   s = g_ucs4_to_utf8 (chars, argc, NULL, NULL, &error);
@@ -354,7 +354,7 @@ swfdec_as_string_split_5 (SwfdecAsContext *cx, SwfdecAsObject *object,
   }
   if (argc > 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (argv[1])) {
     swfdec_as_value_to_string (cx, argv[0]);
-    count = swfdec_as_value_to_integer (cx, *&argv[1]);
+    count = swfdec_as_value_to_integer (cx, argv[1]);
   } else {
     count = G_MAXINT;
   }
@@ -408,7 +408,7 @@ swfdec_as_string_split_6 (SwfdecAsContext *cx, SwfdecAsObject *object,
     return;
   }
   if (argc > 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (argv[1]))
-    count = swfdec_as_value_to_integer (cx, *&argv[1]);
+    count = swfdec_as_value_to_integer (cx, argv[1]);
   else
     count = G_MAXINT;
   if (count <= 0)
@@ -464,7 +464,7 @@ swfdec_as_string_slice (SwfdecAsContext *cx, SwfdecAsObject *object,
   start = CLAMP (start, 0, length);
 
   if (argc > 1) {
-    end = swfdec_as_value_to_integer (cx, *&argv[1]);
+    end = swfdec_as_value_to_integer (cx, argv[1]);
     if (end < 0)
       end += length;
     end = CLAMP (end, start, length);
@@ -521,7 +521,7 @@ swfdec_as_string_substr (SwfdecAsContext *cx, SwfdecAsObject *object,
   len = g_utf8_strlen (string, -1);
   
   if (argc > 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (argv[1])) {
-    to = swfdec_as_value_to_integer (cx, *&argv[1]);
+    to = swfdec_as_value_to_integer (cx, argv[1]);
     /* FIXME: wtf? */
     if (to < 0) {
       if (-to <= from)
@@ -555,7 +555,7 @@ swfdec_as_string_substring (SwfdecAsContext *cx, SwfdecAsObject *object,
 
   len = g_utf8_strlen (string, -1);
   if (argc > 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (argv[1])) {
-    to = swfdec_as_value_to_integer (cx, *&argv[1]);
+    to = swfdec_as_value_to_integer (cx, argv[1]);
   } else {
     to = len;
   }
diff --git a/swfdec/swfdec_as_types.c b/swfdec/swfdec_as_types.c
index 5dafe25..0b7211d 100644
--- a/swfdec/swfdec_as_types.c
+++ b/swfdec/swfdec_as_types.c
@@ -627,7 +627,7 @@ swfdec_as_value_to_boolean (SwfdecAsContext *context, SwfdecAsValue value)
       }
     case SWFDEC_AS_TYPE_STRING:
       if (context->version <= 6) {
-	double d = swfdec_as_value_to_number (context, *&value);
+	double d = swfdec_as_value_to_number (context, value);
 	return d != 0.0 && !isnan (d);
       } else {
 	return SWFDEC_AS_VALUE_GET_STRING (value) != SWFDEC_AS_STR_EMPTY;
diff --git a/swfdec/swfdec_asbroadcaster.c b/swfdec/swfdec_asbroadcaster.c
index e21d03a..d29f221 100644
--- a/swfdec/swfdec_asbroadcaster.c
+++ b/swfdec/swfdec_asbroadcaster.c
@@ -56,7 +56,7 @@ broadcastMessage (SwfdecAsContext *cx, SwfdecAsObject *object,
 
   listeners = SWFDEC_AS_VALUE_GET_COMPOSITE (val);
   swfdec_as_object_get_variable (listeners, SWFDEC_AS_STR_length, &val);
-  length = swfdec_as_value_to_integer (cx, *&val);
+  length = swfdec_as_value_to_integer (cx, val);
 
   /* return undefined if we won't try to call anything */
   if (length <= 0)
@@ -65,7 +65,7 @@ broadcastMessage (SwfdecAsContext *cx, SwfdecAsObject *object,
   /* FIXME: solve this wth foreach, so it gets faster for weird cases */
   for (i = 0; i < length; i++) {
     swfdec_as_object_get_variable (listeners, swfdec_as_integer_to_string (cx, i), &val);
-    o = swfdec_as_value_to_object (cx, *&val);
+    o = swfdec_as_value_to_object (cx, val);
     if (o == NULL)
       continue;
     list = g_slist_prepend (list, o);
diff --git a/swfdec/swfdec_color_as.c b/swfdec/swfdec_color_as.c
index 46adf3c..d10f749 100644
--- a/swfdec/swfdec_color_as.c
+++ b/swfdec/swfdec_color_as.c
@@ -116,7 +116,7 @@ swfdec_movie_color_setRGB (SwfdecAsContext *cx, SwfdecAsObject *obj,
   if (movie == NULL)
     return;
 
-  color = swfdec_as_value_to_integer (cx, *&argv[0]);
+  color = swfdec_as_value_to_integer (cx, argv[0]);
 
   movie->color_transform.ra = 0;
   movie->color_transform.rb = (color & 0xFF0000) >> 16;
@@ -135,7 +135,7 @@ parse_property (SwfdecAsObject *obj, const char *name, int *target, gboolean sca
 
   if (!swfdec_as_object_get_variable (obj, name, &val))
     return;
-  d = swfdec_as_value_to_number (obj->context, *&val);
+  d = swfdec_as_value_to_number (obj->context, val);
   if (scale) {
     *target = d * 256.0 / 100.0;
   } else {
diff --git a/swfdec/swfdec_color_matrix_filter_as.c b/swfdec/swfdec_color_matrix_filter_as.c
index 431b427..4ce6d14 100644
--- a/swfdec/swfdec_color_matrix_filter_as.c
+++ b/swfdec/swfdec_color_matrix_filter_as.c
@@ -69,7 +69,7 @@ swfdec_color_matrix_filter_do_set_matrix (SwfdecColorMatrixFilter *cm,
     if (!swfdec_as_object_get_variable (array, swfdec_as_integer_to_string (cx, i), &val)) {
       cm->matrix[i] = 0;
     } else {
-      cm->matrix[i] = swfdec_as_value_to_number (cx, *&val);
+      cm->matrix[i] = swfdec_as_value_to_number (cx, val);
     }
   }
 }
diff --git a/swfdec/swfdec_interval.c b/swfdec/swfdec_interval.c
index 09ec575..dcbd2fe 100644
--- a/swfdec/swfdec_interval.c
+++ b/swfdec/swfdec_interval.c
@@ -107,7 +107,7 @@ swfdec_interval_trigger (SwfdecTimeout *timeout)
   }
   swfdec_sandbox_use (interval->sandbox);
   if (interval->fun_name) {
-    SwfdecAsObject *object = swfdec_as_value_to_object (context, *&interval->args[0]);
+    SwfdecAsObject *object = swfdec_as_value_to_object (context, interval->args[0]);
     if (object) {
       swfdec_as_object_call (object,
 	  interval->fun_name, interval->n_args, interval->args, &ret);
diff --git a/swfdec/swfdec_key_as.c b/swfdec/swfdec_key_as.c
index e39c928..2530ef3 100644
--- a/swfdec/swfdec_key_as.c
+++ b/swfdec/swfdec_key_as.c
@@ -58,7 +58,7 @@ swfdec_key_isDown (SwfdecAsContext *cx, SwfdecAsObject *object,
   if (argc < 1)
     return;
 
-  id = swfdec_as_value_to_integer (cx, *&argv[0]);
+  id = swfdec_as_value_to_integer (cx, argv[0]);
   if (id >= 256) {
     SWFDEC_FIXME ("id %u too big for a keycode", id);
     id %= 256;
diff --git a/swfdec/swfdec_load_object_as.c b/swfdec/swfdec_load_object_as.c
index 44ad012..2b665df 100644
--- a/swfdec/swfdec_load_object_as.c
+++ b/swfdec/swfdec_load_object_as.c
@@ -147,7 +147,7 @@ swfdec_load_object_as_get_headers (SwfdecAsObject *object, guint *header_count,
   list = SWFDEC_AS_VALUE_GET_COMPOSITE (val);
 
   swfdec_as_object_get_variable (list, SWFDEC_AS_STR_length, &val);
-  length = swfdec_as_value_to_integer (cx, *&val);
+  length = swfdec_as_value_to_integer (cx, val);
 
   /* FIXME: solve this with foreach, so it gets faster for weird cases */
   name = NULL;
diff --git a/swfdec/swfdec_movie_as_drawing.c b/swfdec/swfdec_movie_as_drawing.c
index fea65ae..851d444 100644
--- a/swfdec/swfdec_movie_as_drawing.c
+++ b/swfdec/swfdec_movie_as_drawing.c
@@ -106,7 +106,7 @@ swfdec_sprite_movie_gradient_fill_get_length (SwfdecAsObject *o)
   SwfdecAsValue val;
 
   swfdec_as_object_get_variable (o, SWFDEC_AS_STR_length, &val);
-  length = swfdec_as_value_to_integer (o->context, *&val);
+  length = swfdec_as_value_to_integer (o->context, val);
   return MAX (length, 0);
 }
 
@@ -138,15 +138,15 @@ swfdec_sprite_movie_extract_matrix (SwfdecAsObject *o, cairo_matrix_t *mat)
       double x, y, w, h, r;
       cairo_matrix_t input;
       swfdec_as_object_get_variable (o, SWFDEC_AS_STR_x, &val);
-      x = swfdec_as_value_to_number (cx, *&val);
+      x = swfdec_as_value_to_number (cx, val);
       swfdec_as_object_get_variable (o, SWFDEC_AS_STR_y, &val);
-      y = swfdec_as_value_to_number (cx, *&val);
+      y = swfdec_as_value_to_number (cx, val);
       swfdec_as_object_get_variable (o, SWFDEC_AS_STR_w, &val);
-      w = swfdec_as_value_to_number (cx, *&val);
+      w = swfdec_as_value_to_number (cx, val);
       swfdec_as_object_get_variable (o, SWFDEC_AS_STR_h, &val);
-      h = swfdec_as_value_to_number (cx, *&val);
+      h = swfdec_as_value_to_number (cx, val);
       swfdec_as_object_get_variable (o, SWFDEC_AS_STR_r, &val);
-      r = swfdec_as_value_to_number (cx, *&val);
+      r = swfdec_as_value_to_number (cx, val);
       cairo_matrix_init_translate (&input, (x + w) / 2, (y + h) / 2);
       cairo_matrix_scale (&input, w, h);
       cairo_matrix_rotate (&input, r);
@@ -160,17 +160,17 @@ swfdec_sprite_movie_extract_matrix (SwfdecAsObject *o, cairo_matrix_t *mat)
   } else {
     cairo_matrix_t input;
     swfdec_as_object_get_variable (o, SWFDEC_AS_STR_a, &val);
-    input.xx = swfdec_as_value_to_number (cx, *&val);
+    input.xx = swfdec_as_value_to_number (cx, val);
     swfdec_as_object_get_variable (o, SWFDEC_AS_STR_b, &val);
-    input.yx = swfdec_as_value_to_number (cx, *&val);
+    input.yx = swfdec_as_value_to_number (cx, val);
     swfdec_as_object_get_variable (o, SWFDEC_AS_STR_d, &val);
-    input.xy = swfdec_as_value_to_number (cx, *&val);
+    input.xy = swfdec_as_value_to_number (cx, val);
     swfdec_as_object_get_variable (o, SWFDEC_AS_STR_e, &val);
-    input.yy = swfdec_as_value_to_number (cx, *&val);
+    input.yy = swfdec_as_value_to_number (cx, val);
     swfdec_as_object_get_variable (o, SWFDEC_AS_STR_g, &val);
-    input.x0 = swfdec_as_value_to_number (cx, *&val) * SWFDEC_TWIPS_SCALE_FACTOR;
+    input.x0 = swfdec_as_value_to_number (cx, val) * SWFDEC_TWIPS_SCALE_FACTOR;
     swfdec_as_object_get_variable (o, SWFDEC_AS_STR_h, &val);
-    input.y0 = swfdec_as_value_to_number (cx, *&val) * SWFDEC_TWIPS_SCALE_FACTOR;
+    input.y0 = swfdec_as_value_to_number (cx, val) * SWFDEC_TWIPS_SCALE_FACTOR;
     cairo_matrix_init_scale (mat, SWFDEC_TWIPS_SCALE_FACTOR / 32768.0, SWFDEC_TWIPS_SCALE_FACTOR / 32768.0);
     cairo_matrix_multiply (mat, mat, &input);
   }
@@ -220,7 +220,7 @@ swfdec_sprite_movie_beginGradientFill (SwfdecAsContext *cx, SwfdecAsObject *obje
       const char *name = swfdec_as_integer_to_string (cx, i);
       if (swfdec_as_object_get_variable (colors, name, &v)
 	  && SWFDEC_AS_VALUE_IS_NUMBER (v))
-	c = swfdec_as_value_to_integer (cx, *&v);
+	c = swfdec_as_value_to_integer (cx, v);
       else
 	c = 0;
       if (!swfdec_as_object_get_variable (alphas, name, &v)) {
@@ -228,14 +228,14 @@ swfdec_sprite_movie_beginGradientFill (SwfdecAsContext *cx, SwfdecAsObject *obje
       } else if (!SWFDEC_AS_VALUE_IS_NUMBER (v)) {
 	a = 0;
       } else {
-	a = swfdec_as_value_to_integer (cx, *&v);
+	a = swfdec_as_value_to_integer (cx, v);
       }
       if (!swfdec_as_object_get_variable (ratios, name, &v))
 	r = CLAMP (a, 0, 255);
       else if (!SWFDEC_AS_VALUE_IS_NUMBER (v))
 	r = 0;
       else
-	r = swfdec_as_value_to_integer (cx, *&v);
+	r = swfdec_as_value_to_integer (cx, v);
     } else {
       c = a = r = 0;
     }
diff --git a/swfdec/swfdec_player_as.c b/swfdec/swfdec_player_as.c
index 04b4061..0f7bfb6 100644
--- a/swfdec/swfdec_player_as.c
+++ b/swfdec/swfdec_player_as.c
@@ -57,7 +57,7 @@ swfdec_player_do_set_interval (gboolean repeat, SwfdecAsContext *cx, guint argc,
     return;
   }
   if (SWFDEC_IS_AS_FUNCTION (object->relay)) {
-    msecs = swfdec_as_value_to_integer (cx, *&argv[1]);
+    msecs = swfdec_as_value_to_integer (cx, argv[1]);
     if (msecs < MIN_INTERVAL_TIME) {
       SWFDEC_INFO ("interval duration is %u, making it %u msecs", msecs, MIN_INTERVAL_TIME);
       msecs = MIN_INTERVAL_TIME;
@@ -71,7 +71,7 @@ swfdec_player_do_set_interval (gboolean repeat, SwfdecAsContext *cx, guint argc,
       return;
     }
     name = swfdec_as_value_to_string (cx, argv[1]);
-    msecs = swfdec_as_value_to_integer (cx, *&argv[2]);
+    msecs = swfdec_as_value_to_integer (cx, argv[2]);
     if (msecs < MIN_INTERVAL_TIME) {
       SWFDEC_INFO ("interval duration is %u, making it %u msecs", msecs, MIN_INTERVAL_TIME);
       msecs = MIN_INTERVAL_TIME;
@@ -248,7 +248,7 @@ ASSetNative (SwfdecAsContext *cx, SwfdecAsObject *object,
   SWFDEC_AS_CHECK (0, NULL, "ois", &target, &x, &s);
 
   if (argc > 3)
-    y = swfdec_as_value_to_integer (cx, *&argv[3]);
+    y = swfdec_as_value_to_integer (cx, argv[3]);
   else
     y = 0;
   names = g_strsplit (s, ",", -1);
diff --git a/swfdec/swfdec_sprite_movie_as.c b/swfdec/swfdec_sprite_movie_as.c
index 9a3b0da..7448876 100644
--- a/swfdec/swfdec_sprite_movie_as.c
+++ b/swfdec/swfdec_sprite_movie_as.c
@@ -157,7 +157,7 @@ swfdec_sprite_movie_set_filters (SwfdecAsContext *cx, SwfdecAsObject *object,
   swfdec_movie_invalidate_next (movie);
 
   swfdec_as_object_get_variable (array, SWFDEC_AS_STR_length, &val);
-  length = swfdec_as_value_to_integer (cx, *&val);
+  length = swfdec_as_value_to_integer (cx, val);
 
   list = NULL;
   for (i = 0; i < length; i++) {
@@ -641,10 +641,10 @@ swfdec_sprite_movie_startDrag (SwfdecAsContext *cx, SwfdecAsObject *object,
   }
   if (argc >= 5) {
     SwfdecRect rect;
-    rect.x0 = swfdec_as_value_to_number (cx, *&argv[1]);
-    rect.y0 = swfdec_as_value_to_number (cx, *&argv[2]);
-    rect.x1 = swfdec_as_value_to_number (cx, *&argv[3]);
-    rect.y1 = swfdec_as_value_to_number (cx, *&argv[4]);
+    rect.x0 = swfdec_as_value_to_number (cx, argv[1]);
+    rect.y0 = swfdec_as_value_to_number (cx, argv[2]);
+    rect.x1 = swfdec_as_value_to_number (cx, argv[3]);
+    rect.y1 = swfdec_as_value_to_number (cx, argv[4]);
     swfdec_rect_scale (&rect, &rect, SWFDEC_TWIPS_SCALE_FACTOR);
     swfdec_player_set_drag_movie (player, actor, center, &rect);
   } else {
@@ -682,7 +682,7 @@ swfdec_sprite_movie_swapDepths (SwfdecAsContext *cx, SwfdecAsObject *object,
       return;
     depth = other->depth;
   } else {
-    depth = swfdec_as_value_to_integer (cx, *&value);
+    depth = swfdec_as_value_to_integer (cx, value);
     if (movie->parent) {
       other = swfdec_movie_find (movie->parent, depth);
     } else {
diff --git a/swfdec/swfdec_text_field_movie_as.c b/swfdec/swfdec_text_field_movie_as.c
index c1031be..68569b3 100644
--- a/swfdec/swfdec_text_field_movie_as.c
+++ b/swfdec/swfdec_text_field_movie_as.c
@@ -62,7 +62,7 @@ swfdec_text_field_movie_set_readonly (SwfdecAsContext *cx,
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "");
 
   if (argc > 0)
-    swfdec_as_value_to_number (cx, *&argv[0]);
+    swfdec_as_value_to_number (cx, argv[0]);
 }
 
 /*
@@ -124,7 +124,7 @@ swfdec_text_field_movie_set_html (SwfdecAsContext *cx, SwfdecAsObject *object,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, *&argv[0]);
+  swfdec_as_value_to_number (cx, argv[0]);
 
   text->html = value;
 
@@ -210,7 +210,7 @@ swfdec_text_field_movie_set_condenseWhite (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, *&argv[0]);
+  swfdec_as_value_to_number (cx, argv[0]);
 
   text->condense_white = value;
 }
@@ -243,8 +243,8 @@ swfdec_text_field_movie_set_maxChars (SwfdecAsContext *cx,
   if (argc < 1)
     return;
 
-  swfdec_as_value_to_number (cx, *&argv[0]);
-  text->max_chars = swfdec_as_value_to_integer (cx, *&argv[0]);
+  swfdec_as_value_to_number (cx, argv[0]);
+  text->max_chars = swfdec_as_value_to_integer (cx, argv[0]);
 }
 
 static void
@@ -269,7 +269,7 @@ swfdec_text_field_movie_set_multiline (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, *&argv[0]);
+  swfdec_as_value_to_number (cx, argv[0]);
 
   text->multiline = value;
 }
@@ -299,7 +299,7 @@ swfdec_text_field_movie_set_restrict (SwfdecAsContext *cx,
   const char *value;
 
   if (argc > 0)
-    swfdec_as_value_to_number (cx, *&argv[0]);
+    swfdec_as_value_to_number (cx, argv[0]);
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "s", &value);
 
@@ -336,7 +336,7 @@ swfdec_text_field_movie_set_selectable (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, *&argv[0]);
+  swfdec_as_value_to_number (cx, argv[0]);
 
   text->selectable = value;
 
@@ -368,7 +368,7 @@ swfdec_text_field_movie_do_set_type (SwfdecAsContext *cx,
   const char *value;
 
   if (argc > 0)
-    swfdec_as_value_to_number (cx, *&argv[0]);
+    swfdec_as_value_to_number (cx, argv[0]);
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "s", &value);
 
@@ -407,7 +407,7 @@ swfdec_text_field_movie_do_set_variable (SwfdecAsContext *cx,
   const char *value;
 
   if (argc > 0)
-    swfdec_as_value_to_number (cx, *&argv[0]);
+    swfdec_as_value_to_number (cx, argv[0]);
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "s", &value);
 
@@ -477,7 +477,7 @@ swfdec_text_field_movie_set_background (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, *&argv[0]);
+  swfdec_as_value_to_number (cx, argv[0]);
 
   if (text->background != value) {
     text->background = value;
@@ -540,7 +540,7 @@ swfdec_text_field_movie_set_border (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, *&argv[0]);
+  swfdec_as_value_to_number (cx, argv[0]);
 
   if (text->border != value) {
     text->border = value;
@@ -673,7 +673,7 @@ swfdec_text_field_movie_set_mouseWheelEnabled (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, *&argv[0]);
+  swfdec_as_value_to_number (cx, argv[0]);
 
   text->mouse_wheel_enabled = value;
 }
@@ -759,7 +759,7 @@ swfdec_text_field_movie_set_autoSize (SwfdecAsContext *cx,
       text->auto_size = SWFDEC_AUTO_SIZE_NONE;
     }
   } else {
-    swfdec_as_value_to_number (cx, *&argv[0]);
+    swfdec_as_value_to_number (cx, argv[0]);
     s = swfdec_as_value_to_string (cx, argv[0]);
 
     if (!g_ascii_strcasecmp (s, "left")) {
@@ -796,7 +796,7 @@ swfdec_text_field_movie_set_password (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, *&argv[0]);
+  swfdec_as_value_to_number (cx, argv[0]);
 
   swfdec_text_layout_set_password (text->layout, value);
   swfdec_movie_invalidate_last (SWFDEC_MOVIE (text));
@@ -825,7 +825,7 @@ swfdec_text_field_movie_set_wordWrap (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, *&argv[0]);
+  swfdec_as_value_to_number (cx, argv[0]);
 
   swfdec_text_layout_set_word_wrap (text->layout, value);
 }
@@ -855,7 +855,7 @@ swfdec_text_field_movie_set_embedFonts (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, *&argv[0]);
+  swfdec_as_value_to_number (cx, argv[0]);
 
   if (!text->embed_fonts && value)
     SWFDEC_FIXME ("Using embed fonts in TextField not supported");
@@ -901,7 +901,7 @@ swfdec_text_field_movie_set_styleSheet (SwfdecAsContext *cx,
   if (argc < 1)
     return;
 
-  swfdec_as_value_to_number (cx, *&argv[0]);
+  swfdec_as_value_to_number (cx, argv[0]);
 
   if (SWFDEC_AS_VALUE_IS_OBJECT (argv[0])) {
     value = SWFDEC_AS_VALUE_GET_OBJECT (argv[0]);
@@ -1118,7 +1118,7 @@ swfdec_text_field_movie_setTextFormat (SwfdecAsContext *cx,
     end = length;
     i = 0;
   } else {
-    val = swfdec_as_value_to_integer (cx, *&argv[0]);
+    val = swfdec_as_value_to_integer (cx, argv[0]);
     start = MAX (val, 0);
     start = MIN (start, length);
     if (argc <= 2) {
@@ -1129,7 +1129,7 @@ swfdec_text_field_movie_setTextFormat (SwfdecAsContext *cx,
       }
       i = 1;
     } else {
-      val = swfdec_as_value_to_integer (cx, *&argv[1]);
+      val = swfdec_as_value_to_integer (cx, argv[1]);
       end = MAX (val, 0);
       end = CLAMP (end, start, length);
       i = 2;
@@ -1187,7 +1187,7 @@ swfdec_text_field_movie_getTextFormat (SwfdecAsContext *cx,
     start = 0;
     end = length;
   } else {
-    val = swfdec_as_value_to_integer (cx, *&argv[0]);
+    val = swfdec_as_value_to_integer (cx, argv[0]);
     start = MAX (val, 0);
     start = MIN (start, length);
     if (argc == 1) {
@@ -1197,7 +1197,7 @@ swfdec_text_field_movie_getTextFormat (SwfdecAsContext *cx,
 	end = MIN (start + 1, length);
       }
     } else {
-      val = swfdec_as_value_to_integer (cx, *&argv[1]);
+      val = swfdec_as_value_to_integer (cx, argv[1]);
       end = MAX (val, 0);
       end = CLAMP (end, start, length);
     }
diff --git a/swfdec/swfdec_text_format.c b/swfdec/swfdec_text_format.c
index df966c8..a3b756f 100644
--- a/swfdec/swfdec_text_format.c
+++ b/swfdec/swfdec_text_format.c
@@ -136,8 +136,8 @@ swfdec_text_format_set_string (SwfdecAsObject *object,
     return;
 
   context = swfdec_gc_object_get_context (format);
-  swfdec_as_value_to_integer (context, *&argv[0]);
-  swfdec_as_value_to_number (context, *&argv[0]);
+  swfdec_as_value_to_integer (context, argv[0]);
+  swfdec_as_value_to_number (context, argv[0]);
   s = swfdec_as_value_to_string (context, argv[0]);
 
   if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]) ||
@@ -188,8 +188,8 @@ swfdec_text_format_set_boolean (SwfdecAsObject *object,
     return;
 
   context = swfdec_gc_object_get_context (format);
-  swfdec_as_value_to_integer (context, *&argv[0]);
-  swfdec_as_value_to_number (context, *&argv[0]);
+  swfdec_as_value_to_integer (context, argv[0]);
+  swfdec_as_value_to_number (context, argv[0]);
   swfdec_as_value_to_string (context, argv[0]);
 
   if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]) ||
@@ -333,8 +333,8 @@ swfdec_text_format_do_set_align (SwfdecAsContext *cx, SwfdecAsObject *object,
   if (argc < 1)
     return;
 
-  swfdec_as_value_to_integer (cx, *&argv[0]);
-  swfdec_as_value_to_number (cx, *&argv[0]);
+  swfdec_as_value_to_integer (cx, argv[0]);
+  swfdec_as_value_to_number (cx, argv[0]);
   s = swfdec_as_value_to_string (cx, argv[0]);
 
   if (!g_ascii_strcasecmp (s, "left")) {
@@ -432,8 +432,8 @@ swfdec_text_format_do_set_color (SwfdecAsContext *cx, SwfdecAsObject *object,
       SWFDEC_AS_VALUE_IS_NULL (argv[0])) {
     SWFDEC_TEXT_ATTRIBUTE_UNSET (format->values_set, SWFDEC_TEXT_ATTRIBUTE_COLOR);
   } else {
-    format->attr.color = (unsigned) swfdec_as_value_to_integer (cx, *&argv[0]);
-    swfdec_as_value_to_integer (cx, *&argv[0]);
+    format->attr.color = (unsigned) swfdec_as_value_to_integer (cx, argv[0]);
+    swfdec_as_value_to_integer (cx, argv[0]);
     swfdec_as_value_to_string (cx, argv[0]);
 
     SWFDEC_TEXT_ATTRIBUTE_SET (format->values_set, SWFDEC_TEXT_ATTRIBUTE_COLOR);
@@ -482,8 +482,8 @@ swfdec_text_format_do_set_display (SwfdecAsContext *cx, SwfdecAsObject *object,
     return;
   format = SWFDEC_TEXT_FORMAT (object->relay);
 
-  swfdec_as_value_to_integer (cx, *&argv[0]);
-  swfdec_as_value_to_number (cx, *&argv[0]);
+  swfdec_as_value_to_integer (cx, argv[0]);
+  swfdec_as_value_to_number (cx, argv[0]);
   swfdec_as_value_to_string (cx, argv[0]);
   s = swfdec_as_value_to_string (cx, argv[0]); // oh yes, let's call it twice
 
@@ -620,8 +620,8 @@ swfdec_text_format_do_set_letter_spacing (SwfdecAsContext *cx,
   if (argc < 1)
     return;
 
-  swfdec_as_value_to_integer (cx, *&argv[0]);
-  d = swfdec_as_value_to_number (cx, *&argv[0]);
+  swfdec_as_value_to_integer (cx, argv[0]);
+  d = swfdec_as_value_to_number (cx, argv[0]);
   swfdec_as_value_to_string (cx, argv[0]);
 
   if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]) ||
@@ -710,8 +710,8 @@ swfdec_text_format_do_set_tab_stops (SwfdecAsContext *cx,
   if (argc < 1)
     return;
 
-  swfdec_as_value_to_integer (cx, *&argv[0]);
-  swfdec_as_value_to_number (cx, *&argv[0]);
+  swfdec_as_value_to_integer (cx, argv[0]);
+  swfdec_as_value_to_number (cx, argv[0]);
   swfdec_as_value_to_string (cx, argv[0]);
 
   if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]) ||
diff --git a/swfdec/swfdec_xml.c b/swfdec/swfdec_xml.c
index 706d920..7afd092 100644
--- a/swfdec/swfdec_xml.c
+++ b/swfdec/swfdec_xml.c
@@ -354,7 +354,7 @@ swfdec_xml_set_status (SwfdecAsContext *cx, SwfdecAsObject *object,
   if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]))
     return;
 
-  d = swfdec_as_value_to_number (cx, *&argv[0]);
+  d = swfdec_as_value_to_number (cx, argv[0]);
   if (!isfinite (d))
     xml->status = 0;
   else
commit addfa69a847eb835611a43212f01911d900965e0
Author: Benjamin Otte <otte at gnome.org>
Date:   Thu Nov 6 13:47:47 2008 +0100

    make swfdec_as_value_to_primitive() use SwfdecAsValue directly

diff --git a/swfdec/swfdec_as_interpret.c b/swfdec/swfdec_as_interpret.c
index 6adff0b..29cf113 100644
--- a/swfdec/swfdec_as_interpret.c
+++ b/swfdec/swfdec_as_interpret.c
@@ -1020,14 +1020,14 @@ swfdec_action_new_comparison (SwfdecAsContext *cx, guint action, const guint8 *d
     rval = tmp;
   }
   /* comparison with object is always false */
-  swfdec_as_value_to_primitive (lval);
+  *lval = swfdec_as_value_to_primitive (*lval);
   if (SWFDEC_AS_VALUE_IS_OBJECT (*lval)) {
     swfdec_as_stack_pop (cx);
     SWFDEC_AS_VALUE_SET_BOOLEAN (swfdec_as_stack_peek (cx, 1), FALSE);
     return;
   }
   /* same for the rval */
-  swfdec_as_value_to_primitive (rval);
+  *rval = swfdec_as_value_to_primitive (*rval);
   if (SWFDEC_AS_VALUE_IS_OBJECT (*rval)) {
     swfdec_as_stack_pop (cx);
     SWFDEC_AS_VALUE_SET_BOOLEAN (swfdec_as_stack_peek (cx, 1), FALSE);
@@ -1420,10 +1420,8 @@ swfdec_action_equals2_5 (SwfdecAsContext *cx, guint action, const guint8 *data,
 
   rval = swfdec_as_stack_peek (cx, 1);
   lval = swfdec_as_stack_peek (cx, 2);
-  rtmp = *rval;
-  ltmp = *lval;
-  swfdec_as_value_to_primitive (&rtmp);
-  swfdec_as_value_to_primitive (&ltmp);
+  rtmp = swfdec_as_value_to_primitive (*rval);
+  ltmp = swfdec_as_value_to_primitive (*lval);
   ltype = SWFDEC_AS_VALUE_GET_TYPE (ltmp);
   rtype = SWFDEC_AS_VALUE_GET_TYPE (rtmp);
   
@@ -1433,14 +1431,14 @@ swfdec_action_equals2_5 (SwfdecAsContext *cx, guint action, const guint8 *data,
       if (rtype == SWFDEC_AS_TYPE_MOVIE) {
 	rval = &rtmp;
       } else {
-	swfdec_as_value_to_primitive (rval);
+	*rval = swfdec_as_value_to_primitive (*rval);
       }
       cond = SWFDEC_AS_VALUE_IS_MOVIE (*rval) && 
 	SWFDEC_AS_VALUE_GET_MOVIE (ltmp) == SWFDEC_AS_VALUE_GET_MOVIE (*rval);
       goto out;
     }
     if (rtype == SWFDEC_AS_TYPE_MOVIE) {
-      swfdec_as_value_to_primitive (lval);
+      *lval = swfdec_as_value_to_primitive (*lval);
       cond = SWFDEC_AS_VALUE_IS_MOVIE (*lval) && 
 	SWFDEC_AS_VALUE_GET_MOVIE (rtmp) == SWFDEC_AS_VALUE_GET_MOVIE (*lval);
       goto out;
@@ -1504,8 +1502,8 @@ swfdec_action_equals2_6 (SwfdecAsContext *cx, guint action, const guint8 *data,
     cond = SWFDEC_AS_VALUE_GET_OBJECT (*lval) == SWFDEC_AS_VALUE_GET_OBJECT (*rval);
     goto out;
   }
-  swfdec_as_value_to_primitive (lval);
-  swfdec_as_value_to_primitive (rval);
+  *lval = swfdec_as_value_to_primitive (*lval);
+  *rval = swfdec_as_value_to_primitive (*rval);
   
   /* check if we have equal movieclips */
   if (SWFDEC_AS_VALUE_IS_MOVIE (*lval)) {
diff --git a/swfdec/swfdec_as_types.c b/swfdec/swfdec_as_types.c
index b6404f2..5dafe25 100644
--- a/swfdec/swfdec_as_types.c
+++ b/swfdec/swfdec_as_types.c
@@ -452,7 +452,7 @@ swfdec_as_value_to_number (SwfdecAsContext *context, SwfdecAsValue value)
 {
   g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), 0.0);
 
-  swfdec_as_value_to_primitive (&value);
+  value = swfdec_as_value_to_primitive (value);
 
   switch (SWFDEC_AS_VALUE_GET_TYPE (value)) {
     case SWFDEC_AS_TYPE_UNDEFINED:
@@ -650,15 +650,18 @@ swfdec_as_value_to_boolean (SwfdecAsContext *context, SwfdecAsValue value)
 * values are values that are not objects. If the value is an object, the 
 * object's valueOf function is called. If the result of that function is still 
 * an object, it is returned nonetheless.
+*
+* Returns: The primitive value for &value
 **/
-void
-swfdec_as_value_to_primitive (SwfdecAsValue *value)
+SwfdecAsValue
+swfdec_as_value_to_primitive (SwfdecAsValue value)
 {
 
-  if (SWFDEC_AS_VALUE_IS_OBJECT (*value)) {
-    swfdec_as_object_call (SWFDEC_AS_VALUE_GET_OBJECT (*value), SWFDEC_AS_STR_valueOf,
-	0, NULL, value);
+  if (SWFDEC_AS_VALUE_IS_OBJECT (value)) {
+    swfdec_as_object_call (SWFDEC_AS_VALUE_GET_OBJECT (value), SWFDEC_AS_STR_valueOf,
+	0, NULL, &value);
   }
+  return value;
 }
 
 /**
diff --git a/swfdec/swfdec_as_types.h b/swfdec/swfdec_as_types.h
index a6914c0..ce863f8 100644
--- a/swfdec/swfdec_as_types.h
+++ b/swfdec/swfdec_as_types.h
@@ -126,7 +126,7 @@ double		swfdec_as_value_to_number	(SwfdecAsContext *	context,
 						 SwfdecAsValue		value);
 SwfdecAsObject *swfdec_as_value_to_object	(SwfdecAsContext *	context,
 						 SwfdecAsValue		value);
-void		swfdec_as_value_to_primitive	(SwfdecAsValue *	value);
+SwfdecAsValue	swfdec_as_value_to_primitive	(SwfdecAsValue		value);
 const char *	swfdec_as_value_to_string	(SwfdecAsContext *	context,
 						 SwfdecAsValue		value);
 
commit e843173c156d3e7e729ac326365521463e4e51a3
Author: Benjamin Otte <otte at gnome.org>
Date:   Thu Nov 6 13:43:03 2008 +0100

    make swfdec_as_value_to_object () take a SwfdecAsValue

diff --git a/swfdec/swfdec_as_array.c b/swfdec/swfdec_as_array.c
index 65734b8..afcbbd2 100644
--- a/swfdec/swfdec_as_array.c
+++ b/swfdec/swfdec_as_array.c
@@ -931,14 +931,14 @@ swfdec_as_array_sort_compare (gconstpointer a_ptr, gconstpointer b_ptr,
 
     i = 0;
     do {
-      object = swfdec_as_value_to_object (data->context, a);
+      object = swfdec_as_value_to_object (data->context, *a);
       if (object) {
 	swfdec_as_object_get_variable (object, data->fields[i], &a_comp);
       } else {
 	SWFDEC_AS_VALUE_SET_UNDEFINED (&a_comp);
       }
 
-      object = swfdec_as_value_to_object (data->context, b);
+      object = swfdec_as_value_to_object (data->context, *b);
       if (object) {
 	swfdec_as_object_get_variable (object, data->fields[i], &b_comp);
       } else {
diff --git a/swfdec/swfdec_as_interpret.c b/swfdec/swfdec_as_interpret.c
index ce394fe..6adff0b 100644
--- a/swfdec/swfdec_as_interpret.c
+++ b/swfdec/swfdec_as_interpret.c
@@ -745,7 +745,7 @@ swfdec_action_set_property (SwfdecAsContext *cx, guint action, const guint8 *dat
 static void
 swfdec_action_get_member (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
 {
-  SwfdecAsObject *object = swfdec_as_value_to_object (cx, swfdec_as_stack_peek (cx, 2));
+  SwfdecAsObject *object = swfdec_as_value_to_object (cx, *swfdec_as_stack_peek (cx, 2));
   if (object) {
     const char *name;
     name = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 1));
@@ -864,7 +864,7 @@ swfdec_action_call_method (SwfdecAsContext *cx, guint action, const guint8 *data
   const char *name;
   
   swfdec_as_stack_ensure_size (cx, 3);
-  obj = swfdec_as_value_to_object (cx, swfdec_as_stack_peek (cx, 2));
+  obj = swfdec_as_value_to_object (cx, *swfdec_as_stack_peek (cx, 2));
   n_args = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 3));
   val = swfdec_as_stack_peek (cx, 1);
   if (obj) {
@@ -2762,7 +2762,7 @@ swfdec_action_with (SwfdecAsContext *cx, guint action, const guint8 *data, guint
     return;
   }
   offset = data[0] | (data[1] << 8);
-  object = swfdec_as_value_to_object (cx, swfdec_as_stack_peek (cx, 1));
+  object = swfdec_as_value_to_object (cx, *swfdec_as_stack_peek (cx, 1));
   if (object == NULL) {
     SWFDEC_INFO ("With called without an object, skipping");
     cx->frame->pc = (guint8 *) data + len + offset;
diff --git a/swfdec/swfdec_as_native_function.c b/swfdec/swfdec_as_native_function.c
index 0b7c5e1..18aa856 100644
--- a/swfdec/swfdec_as_native_function.c
+++ b/swfdec/swfdec_as_native_function.c
@@ -365,7 +365,7 @@ swfdec_as_native_function_checkv (SwfdecAsContext *cx, SwfdecAsObject *object,
       case 'O':
 	{
 	  SwfdecAsObject **o = va_arg (varargs, SwfdecAsObject **);
-	  *o = swfdec_as_value_to_object (cx, &argv[i]);
+	  *o = swfdec_as_value_to_object (cx, *&argv[i]);
 	  if (*o == NULL && *args != 'O')
 	    return FALSE;
 	}
diff --git a/swfdec/swfdec_as_object.c b/swfdec/swfdec_as_object.c
index efd4cb9..865f185 100644
--- a/swfdec/swfdec_as_object.c
+++ b/swfdec/swfdec_as_object.c
@@ -1524,7 +1524,7 @@ swfdec_as_object_isPrototypeOf (SwfdecAsContext *cx,
   if (argc < 1)
     return;
 
-  class = swfdec_as_value_to_object (cx, &argv[0]);
+  class = swfdec_as_value_to_object (cx, *&argv[0]);
   if (class == NULL)
     return;
 
@@ -1688,7 +1688,7 @@ swfdec_as_object_construct (SwfdecAsContext *cx, SwfdecAsObject *object,
       *ret = argv[0];
       return;
     } else {
-      SwfdecAsObject *result = swfdec_as_value_to_object (cx, &argv[0]);
+      SwfdecAsObject *result = swfdec_as_value_to_object (cx, *&argv[0]);
       if (result != NULL) {
 	SWFDEC_AS_VALUE_SET_OBJECT (ret, result);
 	return;
diff --git a/swfdec/swfdec_as_types.c b/swfdec/swfdec_as_types.c
index 7213b70..b6404f2 100644
--- a/swfdec/swfdec_as_types.c
+++ b/swfdec/swfdec_as_types.c
@@ -555,7 +555,7 @@ swfdec_as_value_to_integer (SwfdecAsContext *context, SwfdecAsValue value)
  * Returns: object representing @value or %NULL.
  **/
 SwfdecAsObject *
-swfdec_as_value_to_object (SwfdecAsContext *context, const SwfdecAsValue *value)
+swfdec_as_value_to_object (SwfdecAsContext *context, SwfdecAsValue value)
 {
   SwfdecAsFunction *fun;
   SwfdecAsValue val;
@@ -563,7 +563,7 @@ swfdec_as_value_to_object (SwfdecAsContext *context, const SwfdecAsValue *value)
 
   g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL);
 
-  switch (SWFDEC_AS_VALUE_GET_TYPE (*value)) {
+  switch (SWFDEC_AS_VALUE_GET_TYPE (value)) {
     case SWFDEC_AS_TYPE_UNDEFINED:
     case SWFDEC_AS_TYPE_NULL:
       return NULL;
@@ -578,7 +578,7 @@ swfdec_as_value_to_object (SwfdecAsContext *context, const SwfdecAsValue *value)
       break;
     case SWFDEC_AS_TYPE_OBJECT:
     case SWFDEC_AS_TYPE_MOVIE:
-      return SWFDEC_AS_VALUE_GET_COMPOSITE (*value);
+      return SWFDEC_AS_VALUE_GET_COMPOSITE (value);
     case SWFDEC_AS_TYPE_INT:
     default:
       g_assert_not_reached ();
@@ -589,7 +589,7 @@ swfdec_as_value_to_object (SwfdecAsContext *context, const SwfdecAsValue *value)
   if (!SWFDEC_AS_VALUE_IS_OBJECT (val) ||
       !SWFDEC_IS_AS_FUNCTION (fun = (SwfdecAsFunction *) (SWFDEC_AS_VALUE_GET_OBJECT (val)->relay)))
     return NULL;
-  swfdec_as_object_create (fun, 1, value, &val);
+  swfdec_as_object_create (fun, 1, &value, &val);
   if (SWFDEC_AS_VALUE_IS_OBJECT (val)) {
     return SWFDEC_AS_VALUE_GET_OBJECT (val);
   } else {
@@ -684,7 +684,7 @@ swfdec_as_value_get_variable (SwfdecAsContext *cx, const SwfdecAsValue *value,
   g_return_if_fail (name != NULL);
   g_return_if_fail (ret != NULL);
 
-  object = swfdec_as_value_to_object (cx, value);
+  object = swfdec_as_value_to_object (cx, *value);
   if (object == NULL) {
     SWFDEC_AS_VALUE_SET_UNDEFINED (ret);
     return;
diff --git a/swfdec/swfdec_as_types.h b/swfdec/swfdec_as_types.h
index 43b0689..a6914c0 100644
--- a/swfdec/swfdec_as_types.h
+++ b/swfdec/swfdec_as_types.h
@@ -125,7 +125,7 @@ int		swfdec_as_value_to_integer	(SwfdecAsContext *	context,
 double		swfdec_as_value_to_number	(SwfdecAsContext *	context,
 						 SwfdecAsValue		value);
 SwfdecAsObject *swfdec_as_value_to_object	(SwfdecAsContext *	context,
-						 const SwfdecAsValue *	value);
+						 SwfdecAsValue		value);
 void		swfdec_as_value_to_primitive	(SwfdecAsValue *	value);
 const char *	swfdec_as_value_to_string	(SwfdecAsContext *	context,
 						 SwfdecAsValue		value);
diff --git a/swfdec/swfdec_asbroadcaster.c b/swfdec/swfdec_asbroadcaster.c
index 48f0931..e21d03a 100644
--- a/swfdec/swfdec_asbroadcaster.c
+++ b/swfdec/swfdec_asbroadcaster.c
@@ -65,7 +65,7 @@ broadcastMessage (SwfdecAsContext *cx, SwfdecAsObject *object,
   /* FIXME: solve this wth foreach, so it gets faster for weird cases */
   for (i = 0; i < length; i++) {
     swfdec_as_object_get_variable (listeners, swfdec_as_integer_to_string (cx, i), &val);
-    o = swfdec_as_value_to_object (cx, &val);
+    o = swfdec_as_value_to_object (cx, *&val);
     if (o == NULL)
       continue;
     list = g_slist_prepend (list, o);
diff --git a/swfdec/swfdec_interval.c b/swfdec/swfdec_interval.c
index 233f7f0..09ec575 100644
--- a/swfdec/swfdec_interval.c
+++ b/swfdec/swfdec_interval.c
@@ -107,7 +107,7 @@ swfdec_interval_trigger (SwfdecTimeout *timeout)
   }
   swfdec_sandbox_use (interval->sandbox);
   if (interval->fun_name) {
-    SwfdecAsObject *object = swfdec_as_value_to_object (context, &interval->args[0]);
+    SwfdecAsObject *object = swfdec_as_value_to_object (context, *&interval->args[0]);
     if (object) {
       swfdec_as_object_call (object,
 	  interval->fun_name, interval->n_args, interval->args, &ret);
commit a8f57a226f1db5e623726dfe007e53022016d910
Author: Benjamin Otte <otte at gnome.org>
Date:   Thu Nov 6 13:38:58 2008 +0100

    make swfdec_as_value_to_integer() take a SwfdecAsValue

diff --git a/swfdec/swfdec_as_array.c b/swfdec/swfdec_as_array.c
index a210916..65734b8 100644
--- a/swfdec/swfdec_as_array.c
+++ b/swfdec/swfdec_as_array.c
@@ -76,7 +76,7 @@ swfdec_as_array_length_as_integer (SwfdecAsObject *object)
   g_return_val_if_fail (object != NULL, 0);
 
   swfdec_as_object_get_variable (object, SWFDEC_AS_STR_length, &val);
-  length = swfdec_as_value_to_integer (object->context, &val);
+  length = swfdec_as_value_to_integer (object->context, *&val);
 
   return length;
 }
@@ -751,7 +751,7 @@ swfdec_as_array_slice (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc,
   length = swfdec_as_array_get_length (object);
 
   if (argc > 0) {
-    start_index = swfdec_as_value_to_integer (cx, &argv[0]);
+    start_index = swfdec_as_value_to_integer (cx, *&argv[0]);
     if (start_index < 0)
       start_index = length + start_index;
     start_index = CLAMP (start_index, 0, length);
@@ -760,7 +760,7 @@ swfdec_as_array_slice (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc,
   }
 
   if (argc > 1) {
-    gint32 endIndex = swfdec_as_value_to_integer (cx, &argv[1]);
+    gint32 endIndex = swfdec_as_value_to_integer (cx, *&argv[1]);
     if (endIndex < 0)
       endIndex = length + endIndex;
     endIndex = CLAMP (endIndex, start_index, length);
@@ -789,13 +789,13 @@ swfdec_as_array_splice (SwfdecAsContext *cx, SwfdecAsObject *object,
 
   length = swfdec_as_array_get_length (object);
 
-  start_index = swfdec_as_value_to_integer (cx, &argv[0]);
+  start_index = swfdec_as_value_to_integer (cx, *&argv[0]);
   if (start_index < 0)
     start_index = length + start_index;
   start_index = CLAMP (start_index, 0, length);
 
   if (argc > 1) {
-    int tmp = swfdec_as_value_to_integer (cx, &argv[1]);
+    int tmp = swfdec_as_value_to_integer (cx, *&argv[1]);
     if (tmp < 0)
       return;
     num_remove = MIN (tmp, length - start_index);
@@ -860,7 +860,7 @@ swfdec_as_array_sort_compare_values (SwfdecAsContext *cx,
     SwfdecAsValue argv[2] = { *a, *b };
     SwfdecAsValue ret;
     swfdec_as_function_call (custom_function, NULL, 2, argv, &ret);
-    retval = swfdec_as_value_to_integer (cx, &ret);
+    retval = swfdec_as_value_to_integer (cx, *&ret);
   }
   else if (options & SORT_OPTION_NUMERIC &&
       (SWFDEC_AS_VALUE_IS_NUMBER (*a) ||
@@ -1185,7 +1185,7 @@ swfdec_as_array_sort (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc,
   }
 
   if (argc > pos) {
-    options = swfdec_as_value_to_integer (cx, &argv[pos]) & MASK_SORT_OPTION;
+    options = swfdec_as_value_to_integer (cx, *&argv[pos]) & MASK_SORT_OPTION;
   } else {
     options = 0;
   }
@@ -1252,12 +1252,12 @@ swfdec_as_array_sortOn (SwfdecAsContext *cx, SwfdecAsObject *object,
 	for (i = 0; i < num_fields; i++) {
 	  swfdec_as_array_get_value (array, i, &val);
 	  options[i] =
-	    swfdec_as_value_to_integer (cx, &val) & MASK_SORT_OPTION;
+	    swfdec_as_value_to_integer (cx, *&val) & MASK_SORT_OPTION;
 	}
       }
     } else {
       options[0] =
-	swfdec_as_value_to_integer (cx, &argv[1]) & MASK_SORT_OPTION;
+	swfdec_as_value_to_integer (cx, *&argv[1]) & MASK_SORT_OPTION;
       for (i = 1; i < num_fields; i++) {
 	options[i] = options[0];
       }
@@ -1285,7 +1285,7 @@ swfdec_as_array_construct (SwfdecAsContext *cx, SwfdecAsObject *object,
   object->array = TRUE;
 
   if (argc == 1 && SWFDEC_AS_VALUE_IS_NUMBER (argv[0])) {
-    int l = swfdec_as_value_to_integer (cx, &argv[0]);
+    int l = swfdec_as_value_to_integer (cx, *&argv[0]);
     swfdec_as_array_set_length (object, l < 0 ? 0 : l);
   } else if (argc > 0) {
     swfdec_as_array_append (object, argc, argv);
diff --git a/swfdec/swfdec_as_context.c b/swfdec/swfdec_as_context.c
index f7e6ce6..758f958 100644
--- a/swfdec/swfdec_as_context.c
+++ b/swfdec/swfdec_as_context.c
@@ -1085,8 +1085,8 @@ swfdec_as_context_ASSetPropFlags (SwfdecAsContext *cx, SwfdecAsObject *object,
   if (!SWFDEC_AS_VALUE_IS_COMPOSITE (argv[0]))
     return;
   obj = SWFDEC_AS_VALUE_GET_COMPOSITE (argv[0]);
-  flags[0] = swfdec_as_value_to_integer (cx, &argv[2]);
-  flags[1] = (argc > 3) ? swfdec_as_value_to_integer (cx, &argv[3]) : 0;
+  flags[0] = swfdec_as_value_to_integer (cx, *&argv[2]);
+  flags[1] = (argc > 3) ? swfdec_as_value_to_integer (cx, *&argv[3]) : 0;
 
   if (flags[0] == 0 && flags[1] == 0) {
     // we should add autosizing length attribute here
diff --git a/swfdec/swfdec_as_function.c b/swfdec/swfdec_as_function.c
index 45fb7bb..99c8d9a 100644
--- a/swfdec/swfdec_as_function.c
+++ b/swfdec/swfdec_as_function.c
@@ -146,7 +146,7 @@ swfdec_as_function_apply (SwfdecAsContext *cx, SwfdecAsObject *object,
     array = SWFDEC_AS_VALUE_GET_COMPOSITE (argv[1]);
 
     swfdec_as_object_get_variable (array, SWFDEC_AS_STR_length, &val);
-    length = swfdec_as_value_to_integer (cx, &val);
+    length = swfdec_as_value_to_integer (cx, *&val);
 
     if (length > 0) {
       /* FIXME: find a smarter way to do this, like providing argv not as an array */
diff --git a/swfdec/swfdec_as_interpret.c b/swfdec/swfdec_as_interpret.c
index 6124210..ce394fe 100644
--- a/swfdec/swfdec_as_interpret.c
+++ b/swfdec/swfdec_as_interpret.c
@@ -179,7 +179,7 @@ swfdec_value_to_frame (SwfdecAsContext *cx, SwfdecSpriteMovie *movie, SwfdecAsVa
     else
       frame = d;
   } else if (SWFDEC_AS_VALUE_IS_NUMBER (*val)) {
-    frame = swfdec_as_value_to_integer (cx, val);
+    frame = swfdec_as_value_to_integer (cx, *val);
   } else {
     SWFDEC_WARNING ("cannot convert value to frame number");
     /* FIXME: how do we treat undefined etc? */
@@ -698,7 +698,7 @@ swfdec_action_get_property (SwfdecAsContext *cx, guint action, const guint8 *dat
   SwfdecMovie *movie;
   guint id;
 
-  id = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 1));
+  id = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 1));
   if (!SWFDEC_IS_PLAYER (cx)) {
     SWFDEC_INFO ("tried using GetProperty in a non-SwfdecPlayer context");
     movie = NULL;
@@ -724,7 +724,7 @@ swfdec_action_set_property (SwfdecAsContext *cx, guint action, const guint8 *dat
   SwfdecMovie *movie;
   guint id;
 
-  id = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 2));
+  id = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 2));
   if (!SWFDEC_IS_PLAYER (cx)) {
     SWFDEC_INFO ("tried using GetProperty in a non-SwfdecPlayer context");
     movie = NULL;
@@ -838,7 +838,7 @@ swfdec_action_call_function (SwfdecAsContext *cx, guint action, const guint8 *da
   SwfdecAsValue *fun, *thisp;
   
   swfdec_as_stack_ensure_size (cx, 2);
-  n_args = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 2));
+  n_args = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 2));
   name = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 1));
   thisp = swfdec_as_stack_peek (cx, 2);
   fun = swfdec_as_stack_peek (cx, 1);
@@ -865,7 +865,7 @@ swfdec_action_call_method (SwfdecAsContext *cx, guint action, const guint8 *data
   
   swfdec_as_stack_ensure_size (cx, 3);
   obj = swfdec_as_value_to_object (cx, swfdec_as_stack_peek (cx, 2));
-  n_args = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 3));
+  n_args = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 3));
   val = swfdec_as_stack_peek (cx, 1);
   if (obj) {
     name = swfdec_as_value_to_string (cx, *val);
@@ -1305,7 +1305,7 @@ swfdec_action_random_number (SwfdecAsContext *cx, guint action, const guint8 *da
   SwfdecAsValue *val;
 
   val = swfdec_as_stack_peek (cx, 1);
-  max = swfdec_as_value_to_integer (cx, val);
+  max = swfdec_as_value_to_integer (cx, *val);
   
   if (max <= 0)
     swfdec_as_value_set_number (cx, val, 0);
@@ -1346,8 +1346,8 @@ swfdec_action_string_extract (SwfdecAsContext *cx, guint action, const guint8 *d
   int start, n, left;
   const char *s;
 
-  n = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 1));
-  start = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 2));
+  n = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 1));
+  start = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 2));
   s = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 3));
   swfdec_as_stack_pop_n (cx, 2);
   left = g_utf8_strlen (s, -1);
@@ -1713,7 +1713,7 @@ swfdec_action_new_object (SwfdecAsContext *cx, guint action, const guint8 *data,
   swfdec_as_stack_ensure_size (cx, 2);
   swfdec_action_get_variable (cx, action, data, len);
   constructor = swfdec_as_stack_peek (cx, 1);
-  n_args = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 2));
+  n_args = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 2));
   n_args = MIN (swfdec_as_stack_get_size (cx) - 2, n_args);
   if (!SWFDEC_AS_VALUE_IS_OBJECT (*constructor) ||
       !SWFDEC_IS_AS_FUNCTION (fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (*constructor)->relay)) {
@@ -1742,7 +1742,7 @@ swfdec_action_new_method (SwfdecAsContext *cx, guint action, const guint8 *data,
   name = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 1));
 
   constructor = swfdec_as_stack_peek (cx, 2);
-  n_args = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 3));
+  n_args = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 3));
   n_args = MIN (swfdec_as_stack_get_size (cx) - 3, n_args);
   if (name == SWFDEC_AS_STR_EMPTY ||
       SWFDEC_AS_VALUE_IS_UNDEFINED (*swfdec_as_stack_peek (cx, 1))) {
@@ -1775,7 +1775,7 @@ swfdec_action_init_object (SwfdecAsContext *cx, guint action, const guint8 *data
   SwfdecAsObject *object;
   guint i, n_args, size;
 
-  n_args = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 1));
+  n_args = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 1));
   swfdec_as_stack_pop (cx);
   if (n_args * 2 > swfdec_as_stack_get_size (cx)) {
     size = swfdec_as_stack_get_size (cx);
@@ -1804,7 +1804,7 @@ swfdec_action_init_array (SwfdecAsContext *cx, guint action, const guint8 *data,
   SwfdecAsObject *array;
 
   swfdec_as_stack_ensure_size (cx, 1);
-  n = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 1));
+  n = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 1));
   swfdec_as_stack_pop (cx);
   array = swfdec_as_array_new (cx);
   /* NB: we can't increase the stack here, as the number can easily be MAXINT */
@@ -1953,8 +1953,8 @@ swfdec_action_bitwise (SwfdecAsContext *cx, guint action, const guint8 *data, gu
 {
   int a, b;
 
-  a = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 1));
-  b = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 2));
+  a = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 1));
+  b = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 2));
 
   switch (action) {
     case 0x60:
@@ -1980,9 +1980,9 @@ swfdec_action_shift (SwfdecAsContext *cx, guint action, const guint8 *data, guin
 {
   int amount, value;
 
-  amount = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 1));
+  amount = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 1));
   amount &= 31;
-  value = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 2));
+  value = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 2));
 
   switch (action) {
     case 0x63:
@@ -2007,7 +2007,7 @@ swfdec_action_to_integer (SwfdecAsContext *cx, guint action, const guint8 *data,
 {
   SwfdecAsValue *val = swfdec_as_stack_peek (cx, 1);
 
-  swfdec_as_value_set_integer (cx, val, swfdec_as_value_to_integer (cx, val));
+  swfdec_as_value_set_integer (cx, val, swfdec_as_value_to_integer (cx, *val));
 }
 
 static void
@@ -2333,7 +2333,7 @@ swfdec_action_implements (SwfdecAsContext *cx, guint action,
   }
 
   val = swfdec_as_stack_pop (cx);
-  argc = swfdec_as_value_to_integer (cx, val);
+  argc = swfdec_as_value_to_integer (cx, *val);
 
   if (argc > 0) {
     swfdec_as_stack_ensure_size (cx, argc);
@@ -2520,12 +2520,12 @@ swfdec_action_ascii_to_char (SwfdecAsContext *cx, guint action, const guint8 *da
     guint i;
 
     if (action == SWFDEC_AS_ACTION_ASCII_TO_CHAR) {
-      s[0] = ((guint) swfdec_as_value_to_integer (cx, val)) % 256;
+      s[0] = ((guint) swfdec_as_value_to_integer (cx, *val)) % 256;
       s[1] = 0;
     } else {
       g_assert (action == SWFDEC_AS_ACTION_MB_ASCII_TO_CHAR);
 
-      i = ((guint) swfdec_as_value_to_integer (cx, val));
+      i = ((guint) swfdec_as_value_to_integer (cx, *val));
       if (i > 255) {
 	s[0] = i / 256;
 	s[1] = i % 256;
@@ -2546,7 +2546,7 @@ swfdec_action_ascii_to_char (SwfdecAsContext *cx, guint action, const guint8 *da
     }
   } else {
     char *s;
-    gunichar c = ((guint) swfdec_as_value_to_integer (cx, val)) % 65536;
+    gunichar c = ((guint) swfdec_as_value_to_integer (cx, *val)) % 65536;
 
     s = g_ucs4_to_utf8 (&c, 1, NULL, NULL, NULL);
     if (s == NULL) {
@@ -2803,7 +2803,7 @@ swfdec_action_clone_sprite (SwfdecAsContext *cx, guint action, const guint8 *dat
   const char *new_name;
   int depth;
 
-  depth = swfdec_as_value_to_integer (cx, swfdec_as_stack_peek (cx, 1)) - 16384;
+  depth = swfdec_as_value_to_integer (cx, *swfdec_as_stack_peek (cx, 1)) - 16384;
   new_name = swfdec_as_value_to_string (cx, *swfdec_as_stack_peek (cx, 2));
   if (target == NULL) {
     SWFDEC_FIXME ("target is not a movie in CloneSprite");
diff --git a/swfdec/swfdec_as_native_function.c b/swfdec/swfdec_as_native_function.c
index 71c5f8b..0b7c5e1 100644
--- a/swfdec/swfdec_as_native_function.c
+++ b/swfdec/swfdec_as_native_function.c
@@ -331,7 +331,7 @@ swfdec_as_native_function_checkv (SwfdecAsContext *cx, SwfdecAsObject *object,
       case 'i':
 	{
 	  int *j = va_arg (varargs, int *);
-	  *j = swfdec_as_value_to_integer (cx, &argv[i]);
+	  *j = swfdec_as_value_to_integer (cx, *&argv[i]);
 	}
 	break;
       case 'm':
diff --git a/swfdec/swfdec_as_object.c b/swfdec/swfdec_as_object.c
index 3229abf..efd4cb9 100644
--- a/swfdec/swfdec_as_object.c
+++ b/swfdec/swfdec_as_object.c
@@ -733,7 +733,7 @@ swfdec_as_object_set_variable_and_flags (SwfdecAsObject *object,
 	  SWFDEC_AS_STR_length))
     {
       gint32 length_old = swfdec_as_array_get_length (object);
-      gint32 length_new = swfdec_as_value_to_integer (context, value);
+      gint32 length_new = swfdec_as_value_to_integer (context, *value);
       length_new = MAX (0, length_new);
       if (length_old > length_new) {
 	swfdec_as_array_remove_range (object, length_new,
@@ -772,7 +772,7 @@ swfdec_as_object_set_variable_and_flags (SwfdecAsObject *object,
       SwfdecAsValue tmp;
       gint32 length;
       swfdec_as_object_get_variable (object, SWFDEC_AS_STR_length, &tmp);
-      length = swfdec_as_value_to_integer (context, &tmp);
+      length = swfdec_as_value_to_integer (context, *&tmp);
       if (l >= length) {
 	object->array = FALSE;
 	swfdec_as_value_set_integer (context, &tmp, l + 1);
diff --git a/swfdec/swfdec_as_string.c b/swfdec/swfdec_as_string.c
index 928b2f3..aac9587 100644
--- a/swfdec/swfdec_as_string.c
+++ b/swfdec/swfdec_as_string.c
@@ -92,7 +92,7 @@ swfdec_as_string_lastIndexOf (SwfdecAsContext *cx, SwfdecAsObject *object,
   SWFDEC_AS_STRING_CHECK (&string, "s", &s);
 
   if (argc == 2) {
-    int offset = swfdec_as_value_to_integer (cx, &argv[1]);
+    int offset = swfdec_as_value_to_integer (cx, *&argv[1]);
     const char *tmp;
     if (offset < 0) {
       swfdec_as_value_set_integer (cx, ret, -1);
@@ -126,7 +126,7 @@ swfdec_as_string_indexOf (SwfdecAsContext *cx, SwfdecAsObject *object,
   SWFDEC_AS_STRING_CHECK (&string, "s", &s);
 
   if (argc == 2)
-    offset = swfdec_as_value_to_integer (cx, &argv[1]);
+    offset = swfdec_as_value_to_integer (cx, *&argv[1]);
   if (offset < 0)
     offset = 0;
   len = g_utf8_strlen (string, -1);
@@ -206,7 +206,7 @@ swfdec_as_string_fromCharCode_5 (SwfdecAsContext *cx, SwfdecAsObject *object,
 
   if (argc > 0) {
     for (i = 0; i < argc; i++) {
-      c = ((guint) swfdec_as_value_to_integer (cx, &argv[i])) % 65536;
+      c = ((guint) swfdec_as_value_to_integer (cx, *&argv[i])) % 65536;
       if (c > 255) {
 	append = c / 256;
 	g_byte_array_append (array, &append, 1);
@@ -246,7 +246,7 @@ swfdec_as_string_fromCharCode_6 (SwfdecAsContext *cx, SwfdecAsObject *object,
     chars = g_new (gunichar, argc);
 
   for (i = 0; i < argc; i++) {
-    chars[i] = ((guint) swfdec_as_value_to_integer (cx, &argv[i])) % 65536;
+    chars[i] = ((guint) swfdec_as_value_to_integer (cx, *&argv[i])) % 65536;
   }
 
   s = g_ucs4_to_utf8 (chars, argc, NULL, NULL, &error);
@@ -354,7 +354,7 @@ swfdec_as_string_split_5 (SwfdecAsContext *cx, SwfdecAsObject *object,
   }
   if (argc > 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (argv[1])) {
     swfdec_as_value_to_string (cx, argv[0]);
-    count = swfdec_as_value_to_integer (cx, &argv[1]);
+    count = swfdec_as_value_to_integer (cx, *&argv[1]);
   } else {
     count = G_MAXINT;
   }
@@ -408,7 +408,7 @@ swfdec_as_string_split_6 (SwfdecAsContext *cx, SwfdecAsObject *object,
     return;
   }
   if (argc > 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (argv[1]))
-    count = swfdec_as_value_to_integer (cx, &argv[1]);
+    count = swfdec_as_value_to_integer (cx, *&argv[1]);
   else
     count = G_MAXINT;
   if (count <= 0)
@@ -464,7 +464,7 @@ swfdec_as_string_slice (SwfdecAsContext *cx, SwfdecAsObject *object,
   start = CLAMP (start, 0, length);
 
   if (argc > 1) {
-    end = swfdec_as_value_to_integer (cx, &argv[1]);
+    end = swfdec_as_value_to_integer (cx, *&argv[1]);
     if (end < 0)
       end += length;
     end = CLAMP (end, start, length);
@@ -521,7 +521,7 @@ swfdec_as_string_substr (SwfdecAsContext *cx, SwfdecAsObject *object,
   len = g_utf8_strlen (string, -1);
   
   if (argc > 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (argv[1])) {
-    to = swfdec_as_value_to_integer (cx, &argv[1]);
+    to = swfdec_as_value_to_integer (cx, *&argv[1]);
     /* FIXME: wtf? */
     if (to < 0) {
       if (-to <= from)
@@ -555,7 +555,7 @@ swfdec_as_string_substring (SwfdecAsContext *cx, SwfdecAsObject *object,
 
   len = g_utf8_strlen (string, -1);
   if (argc > 1 && !SWFDEC_AS_VALUE_IS_UNDEFINED (argv[1])) {
-    to = swfdec_as_value_to_integer (cx, &argv[1]);
+    to = swfdec_as_value_to_integer (cx, *&argv[1]);
   } else {
     to = len;
   }
diff --git a/swfdec/swfdec_as_types.c b/swfdec/swfdec_as_types.c
index ac3ce47..7213b70 100644
--- a/swfdec/swfdec_as_types.c
+++ b/swfdec/swfdec_as_types.c
@@ -533,11 +533,11 @@ swfdec_as_double_to_integer (double d)
  * Returns: An Integer that can be represented in 32 bits.
  **/
 int
-swfdec_as_value_to_integer (SwfdecAsContext *context, const SwfdecAsValue *value)
+swfdec_as_value_to_integer (SwfdecAsContext *context, SwfdecAsValue value)
 {
   double d;
   
-  d = swfdec_as_value_to_number (context, *value);
+  d = swfdec_as_value_to_number (context, value);
   return swfdec_as_double_to_integer (d);
 }
 
diff --git a/swfdec/swfdec_as_types.h b/swfdec/swfdec_as_types.h
index 46100ba..43b0689 100644
--- a/swfdec/swfdec_as_types.h
+++ b/swfdec/swfdec_as_types.h
@@ -121,7 +121,7 @@ void		swfdec_as_value_set_number	(SwfdecAsContext *	context,
 gboolean	swfdec_as_value_to_boolean	(SwfdecAsContext *	context,
 						 SwfdecAsValue		value);
 int		swfdec_as_value_to_integer	(SwfdecAsContext *	context,
-						 const SwfdecAsValue *	value);
+						 SwfdecAsValue		value);
 double		swfdec_as_value_to_number	(SwfdecAsContext *	context,
 						 SwfdecAsValue		value);
 SwfdecAsObject *swfdec_as_value_to_object	(SwfdecAsContext *	context,
diff --git a/swfdec/swfdec_asbroadcaster.c b/swfdec/swfdec_asbroadcaster.c
index f287cbd..48f0931 100644
--- a/swfdec/swfdec_asbroadcaster.c
+++ b/swfdec/swfdec_asbroadcaster.c
@@ -56,7 +56,7 @@ broadcastMessage (SwfdecAsContext *cx, SwfdecAsObject *object,
 
   listeners = SWFDEC_AS_VALUE_GET_COMPOSITE (val);
   swfdec_as_object_get_variable (listeners, SWFDEC_AS_STR_length, &val);
-  length = swfdec_as_value_to_integer (cx, &val);
+  length = swfdec_as_value_to_integer (cx, *&val);
 
   /* return undefined if we won't try to call anything */
   if (length <= 0)
diff --git a/swfdec/swfdec_bitmap_data.c b/swfdec/swfdec_bitmap_data.c
index 1c4bf69..da44d4f 100644
--- a/swfdec/swfdec_bitmap_data.c
+++ b/swfdec/swfdec_bitmap_data.c
@@ -356,13 +356,13 @@ swfdec_rectangle_from_as_object (SwfdecRectangle *rect, SwfdecAsObject *object)
 
   /* FIXME: This function is untested */
   val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_x);
-  rect->x = swfdec_as_value_to_integer (cx, val);
+  rect->x = swfdec_as_value_to_integer (cx, *val);
   val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_y);
-  rect->y = swfdec_as_value_to_integer (cx, val);
+  rect->y = swfdec_as_value_to_integer (cx, *val);
   val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_width);
-  rect->width = swfdec_as_value_to_integer (cx, val);
+  rect->width = swfdec_as_value_to_integer (cx, *val);
   val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_height);
-  rect->height = swfdec_as_value_to_integer (cx, val);
+  rect->height = swfdec_as_value_to_integer (cx, *val);
   return rect->width > 0 && rect->height > 0;
 }
 
@@ -374,9 +374,9 @@ swfdec_point_from_as_object (int *x, int *y, SwfdecAsObject *object)
 
   /* FIXME: This function is untested */
   val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_x);
-  *x = swfdec_as_value_to_integer (cx, val);
+  *x = swfdec_as_value_to_integer (cx, *val);
   val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_y);
-  *y = swfdec_as_value_to_integer (cx, val);
+  *y = swfdec_as_value_to_integer (cx, *val);
 }
 
 SWFDEC_AS_NATIVE (1100, 4, swfdec_bitmap_data_copyPixels)
diff --git a/swfdec/swfdec_color_as.c b/swfdec/swfdec_color_as.c
index 6e320bb..46adf3c 100644
--- a/swfdec/swfdec_color_as.c
+++ b/swfdec/swfdec_color_as.c
@@ -116,7 +116,7 @@ swfdec_movie_color_setRGB (SwfdecAsContext *cx, SwfdecAsObject *obj,
   if (movie == NULL)
     return;
 
-  color = swfdec_as_value_to_integer (cx, &argv[0]);
+  color = swfdec_as_value_to_integer (cx, *&argv[0]);
 
   movie->color_transform.ra = 0;
   movie->color_transform.rb = (color & 0xFF0000) >> 16;
diff --git a/swfdec/swfdec_key_as.c b/swfdec/swfdec_key_as.c
index c8cb8f8..e39c928 100644
--- a/swfdec/swfdec_key_as.c
+++ b/swfdec/swfdec_key_as.c
@@ -58,7 +58,7 @@ swfdec_key_isDown (SwfdecAsContext *cx, SwfdecAsObject *object,
   if (argc < 1)
     return;
 
-  id = swfdec_as_value_to_integer (cx, &argv[0]);
+  id = swfdec_as_value_to_integer (cx, *&argv[0]);
   if (id >= 256) {
     SWFDEC_FIXME ("id %u too big for a keycode", id);
     id %= 256;
diff --git a/swfdec/swfdec_load_object_as.c b/swfdec/swfdec_load_object_as.c
index a3f8099..44ad012 100644
--- a/swfdec/swfdec_load_object_as.c
+++ b/swfdec/swfdec_load_object_as.c
@@ -147,7 +147,7 @@ swfdec_load_object_as_get_headers (SwfdecAsObject *object, guint *header_count,
   list = SWFDEC_AS_VALUE_GET_COMPOSITE (val);
 
   swfdec_as_object_get_variable (list, SWFDEC_AS_STR_length, &val);
-  length = swfdec_as_value_to_integer (cx, &val);
+  length = swfdec_as_value_to_integer (cx, *&val);
 
   /* FIXME: solve this with foreach, so it gets faster for weird cases */
   name = NULL;
diff --git a/swfdec/swfdec_movie_as_drawing.c b/swfdec/swfdec_movie_as_drawing.c
index cbf888a..fea65ae 100644
--- a/swfdec/swfdec_movie_as_drawing.c
+++ b/swfdec/swfdec_movie_as_drawing.c
@@ -106,7 +106,7 @@ swfdec_sprite_movie_gradient_fill_get_length (SwfdecAsObject *o)
   SwfdecAsValue val;
 
   swfdec_as_object_get_variable (o, SWFDEC_AS_STR_length, &val);
-  length = swfdec_as_value_to_integer (o->context, &val);
+  length = swfdec_as_value_to_integer (o->context, *&val);
   return MAX (length, 0);
 }
 
@@ -220,7 +220,7 @@ swfdec_sprite_movie_beginGradientFill (SwfdecAsContext *cx, SwfdecAsObject *obje
       const char *name = swfdec_as_integer_to_string (cx, i);
       if (swfdec_as_object_get_variable (colors, name, &v)
 	  && SWFDEC_AS_VALUE_IS_NUMBER (v))
-	c = swfdec_as_value_to_integer (cx, &v);
+	c = swfdec_as_value_to_integer (cx, *&v);
       else
 	c = 0;
       if (!swfdec_as_object_get_variable (alphas, name, &v)) {
@@ -228,14 +228,14 @@ swfdec_sprite_movie_beginGradientFill (SwfdecAsContext *cx, SwfdecAsObject *obje
       } else if (!SWFDEC_AS_VALUE_IS_NUMBER (v)) {
 	a = 0;
       } else {
-	a = swfdec_as_value_to_integer (cx, &v);
+	a = swfdec_as_value_to_integer (cx, *&v);
       }
       if (!swfdec_as_object_get_variable (ratios, name, &v))
 	r = CLAMP (a, 0, 255);
       else if (!SWFDEC_AS_VALUE_IS_NUMBER (v))
 	r = 0;
       else
-	r = swfdec_as_value_to_integer (cx, &v);
+	r = swfdec_as_value_to_integer (cx, *&v);
     } else {
       c = a = r = 0;
     }
diff --git a/swfdec/swfdec_player_as.c b/swfdec/swfdec_player_as.c
index f4f4c26..04b4061 100644
--- a/swfdec/swfdec_player_as.c
+++ b/swfdec/swfdec_player_as.c
@@ -57,7 +57,7 @@ swfdec_player_do_set_interval (gboolean repeat, SwfdecAsContext *cx, guint argc,
     return;
   }
   if (SWFDEC_IS_AS_FUNCTION (object->relay)) {
-    msecs = swfdec_as_value_to_integer (cx, &argv[1]);
+    msecs = swfdec_as_value_to_integer (cx, *&argv[1]);
     if (msecs < MIN_INTERVAL_TIME) {
       SWFDEC_INFO ("interval duration is %u, making it %u msecs", msecs, MIN_INTERVAL_TIME);
       msecs = MIN_INTERVAL_TIME;
@@ -71,7 +71,7 @@ swfdec_player_do_set_interval (gboolean repeat, SwfdecAsContext *cx, guint argc,
       return;
     }
     name = swfdec_as_value_to_string (cx, argv[1]);
-    msecs = swfdec_as_value_to_integer (cx, &argv[2]);
+    msecs = swfdec_as_value_to_integer (cx, *&argv[2]);
     if (msecs < MIN_INTERVAL_TIME) {
       SWFDEC_INFO ("interval duration is %u, making it %u msecs", msecs, MIN_INTERVAL_TIME);
       msecs = MIN_INTERVAL_TIME;
@@ -248,7 +248,7 @@ ASSetNative (SwfdecAsContext *cx, SwfdecAsObject *object,
   SWFDEC_AS_CHECK (0, NULL, "ois", &target, &x, &s);
 
   if (argc > 3)
-    y = swfdec_as_value_to_integer (cx, &argv[3]);
+    y = swfdec_as_value_to_integer (cx, *&argv[3]);
   else
     y = 0;
   names = g_strsplit (s, ",", -1);
diff --git a/swfdec/swfdec_sound_object.c b/swfdec/swfdec_sound_object.c
index 5a7d31b..efb6df7 100644
--- a/swfdec/swfdec_sound_object.c
+++ b/swfdec/swfdec_sound_object.c
@@ -224,28 +224,28 @@ swfdec_sound_object_setTransform (SwfdecAsContext *cx, SwfdecAsObject *object,
   /* ll */
   val = swfdec_as_object_peek_variable (trans, SWFDEC_AS_STR_ll);
   if (val) {
-    matrix->ll = swfdec_as_value_to_integer (cx, val);
+    matrix->ll = swfdec_as_value_to_integer (cx, *val);
   } else if (swfdec_as_object_has_variable (trans, SWFDEC_AS_STR_ll) == trans) {
     matrix->ll = 0;
   }
   /* lr */
   val = swfdec_as_object_peek_variable (trans, SWFDEC_AS_STR_lr);
   if (val) {
-    matrix->lr = swfdec_as_value_to_integer (cx, val);
+    matrix->lr = swfdec_as_value_to_integer (cx, *val);
   } else if (swfdec_as_object_has_variable (trans, SWFDEC_AS_STR_lr) == trans) {
     matrix->lr = 0;
   }
   /* rr */
   val = swfdec_as_object_peek_variable (trans, SWFDEC_AS_STR_rr);
   if (val) {
-    matrix->rr = swfdec_as_value_to_integer (cx, val);
+    matrix->rr = swfdec_as_value_to_integer (cx, *val);
   } else if (swfdec_as_object_has_variable (trans, SWFDEC_AS_STR_rr) == trans) {
     matrix->rr = 0;
   }
   /* rl */
   val = swfdec_as_object_peek_variable (trans, SWFDEC_AS_STR_rl);
   if (val) {
-    matrix->rl = swfdec_as_value_to_integer (cx, val);
+    matrix->rl = swfdec_as_value_to_integer (cx, *val);
   } else if (swfdec_as_object_has_variable (trans, SWFDEC_AS_STR_rl) == trans) {
     matrix->rl = 0;
   }
diff --git a/swfdec/swfdec_sprite_movie_as.c b/swfdec/swfdec_sprite_movie_as.c
index c0586e2..9a3b0da 100644
--- a/swfdec/swfdec_sprite_movie_as.c
+++ b/swfdec/swfdec_sprite_movie_as.c
@@ -157,7 +157,7 @@ swfdec_sprite_movie_set_filters (SwfdecAsContext *cx, SwfdecAsObject *object,
   swfdec_movie_invalidate_next (movie);
 
   swfdec_as_object_get_variable (array, SWFDEC_AS_STR_length, &val);
-  length = swfdec_as_value_to_integer (cx, &val);
+  length = swfdec_as_value_to_integer (cx, *&val);
 
   list = NULL;
   for (i = 0; i < length; i++) {
@@ -509,7 +509,7 @@ swfdec_sprite_movie_do_goto (SwfdecSpriteMovie *movie, SwfdecAsValue *target)
       return;
     frame++;
   } else {
-    frame = swfdec_as_value_to_integer (swfdec_gc_object_get_context (movie), target);
+    frame = swfdec_as_value_to_integer (swfdec_gc_object_get_context (movie), *target);
   }
   /* FIXME: how to handle overflow? */
   frame = CLAMP (frame, 1, (int) movie->n_frames);
@@ -682,7 +682,7 @@ swfdec_sprite_movie_swapDepths (SwfdecAsContext *cx, SwfdecAsObject *object,
       return;
     depth = other->depth;
   } else {
-    depth = swfdec_as_value_to_integer (cx, &value);
+    depth = swfdec_as_value_to_integer (cx, *&value);
     if (movie->parent) {
       other = swfdec_movie_find (movie->parent, depth);
     } else {
diff --git a/swfdec/swfdec_text_field_movie_as.c b/swfdec/swfdec_text_field_movie_as.c
index 39356bf..c1031be 100644
--- a/swfdec/swfdec_text_field_movie_as.c
+++ b/swfdec/swfdec_text_field_movie_as.c
@@ -244,7 +244,7 @@ swfdec_text_field_movie_set_maxChars (SwfdecAsContext *cx,
     return;
 
   swfdec_as_value_to_number (cx, *&argv[0]);
-  text->max_chars = swfdec_as_value_to_integer (cx, &argv[0]);
+  text->max_chars = swfdec_as_value_to_integer (cx, *&argv[0]);
 }
 
 static void
@@ -1118,7 +1118,7 @@ swfdec_text_field_movie_setTextFormat (SwfdecAsContext *cx,
     end = length;
     i = 0;
   } else {
-    val = swfdec_as_value_to_integer (cx, &argv[0]);
+    val = swfdec_as_value_to_integer (cx, *&argv[0]);
     start = MAX (val, 0);
     start = MIN (start, length);
     if (argc <= 2) {
@@ -1129,7 +1129,7 @@ swfdec_text_field_movie_setTextFormat (SwfdecAsContext *cx,
       }
       i = 1;
     } else {
-      val = swfdec_as_value_to_integer (cx, &argv[1]);
+      val = swfdec_as_value_to_integer (cx, *&argv[1]);
       end = MAX (val, 0);
       end = CLAMP (end, start, length);
       i = 2;
@@ -1187,7 +1187,7 @@ swfdec_text_field_movie_getTextFormat (SwfdecAsContext *cx,
     start = 0;
     end = length;
   } else {
-    val = swfdec_as_value_to_integer (cx, &argv[0]);
+    val = swfdec_as_value_to_integer (cx, *&argv[0]);
     start = MAX (val, 0);
     start = MIN (start, length);
     if (argc == 1) {
@@ -1197,7 +1197,7 @@ swfdec_text_field_movie_getTextFormat (SwfdecAsContext *cx,
 	end = MIN (start + 1, length);
       }
     } else {
-      val = swfdec_as_value_to_integer (cx, &argv[1]);
+      val = swfdec_as_value_to_integer (cx, *&argv[1]);
       end = MAX (val, 0);
       end = CLAMP (end, start, length);
     }
diff --git a/swfdec/swfdec_text_format.c b/swfdec/swfdec_text_format.c
index 1365822..df966c8 100644
--- a/swfdec/swfdec_text_format.c
+++ b/swfdec/swfdec_text_format.c
@@ -136,7 +136,7 @@ swfdec_text_format_set_string (SwfdecAsObject *object,
     return;
 
   context = swfdec_gc_object_get_context (format);
-  swfdec_as_value_to_integer (context, &argv[0]);
+  swfdec_as_value_to_integer (context, *&argv[0]);
   swfdec_as_value_to_number (context, *&argv[0]);
   s = swfdec_as_value_to_string (context, argv[0]);
 
@@ -188,7 +188,7 @@ swfdec_text_format_set_boolean (SwfdecAsObject *object,
     return;
 
   context = swfdec_gc_object_get_context (format);
-  swfdec_as_value_to_integer (context, &argv[0]);
+  swfdec_as_value_to_integer (context, *&argv[0]);
   swfdec_as_value_to_number (context, *&argv[0]);
   swfdec_as_value_to_string (context, argv[0]);
 
@@ -228,7 +228,7 @@ swfdec_text_format_value_to_integer (SwfdecAsContext *cx, SwfdecAsValue *val,
   double d;
   int n;
 
-  n = swfdec_as_value_to_integer (cx, val);
+  n = swfdec_as_value_to_integer (cx, *val);
   d = swfdec_as_value_to_number (cx, *val);
   swfdec_as_value_to_string (cx, *val);
 
@@ -333,7 +333,7 @@ swfdec_text_format_do_set_align (SwfdecAsContext *cx, SwfdecAsObject *object,
   if (argc < 1)
     return;
 
-  swfdec_as_value_to_integer (cx, &argv[0]);
+  swfdec_as_value_to_integer (cx, *&argv[0]);
   swfdec_as_value_to_number (cx, *&argv[0]);
   s = swfdec_as_value_to_string (cx, argv[0]);
 
@@ -432,8 +432,8 @@ swfdec_text_format_do_set_color (SwfdecAsContext *cx, SwfdecAsObject *object,
       SWFDEC_AS_VALUE_IS_NULL (argv[0])) {
     SWFDEC_TEXT_ATTRIBUTE_UNSET (format->values_set, SWFDEC_TEXT_ATTRIBUTE_COLOR);
   } else {
-    format->attr.color = (unsigned) swfdec_as_value_to_integer (cx, &argv[0]);
-    swfdec_as_value_to_integer (cx, &argv[0]);
+    format->attr.color = (unsigned) swfdec_as_value_to_integer (cx, *&argv[0]);
+    swfdec_as_value_to_integer (cx, *&argv[0]);
     swfdec_as_value_to_string (cx, argv[0]);
 
     SWFDEC_TEXT_ATTRIBUTE_SET (format->values_set, SWFDEC_TEXT_ATTRIBUTE_COLOR);
@@ -482,7 +482,7 @@ swfdec_text_format_do_set_display (SwfdecAsContext *cx, SwfdecAsObject *object,
     return;
   format = SWFDEC_TEXT_FORMAT (object->relay);
 
-  swfdec_as_value_to_integer (cx, &argv[0]);
+  swfdec_as_value_to_integer (cx, *&argv[0]);
   swfdec_as_value_to_number (cx, *&argv[0]);
   swfdec_as_value_to_string (cx, argv[0]);
   s = swfdec_as_value_to_string (cx, argv[0]); // oh yes, let's call it twice
@@ -620,7 +620,7 @@ swfdec_text_format_do_set_letter_spacing (SwfdecAsContext *cx,
   if (argc < 1)
     return;
 
-  swfdec_as_value_to_integer (cx, &argv[0]);
+  swfdec_as_value_to_integer (cx, *&argv[0]);
   d = swfdec_as_value_to_number (cx, *&argv[0]);
   swfdec_as_value_to_string (cx, argv[0]);
 
@@ -710,7 +710,7 @@ swfdec_text_format_do_set_tab_stops (SwfdecAsContext *cx,
   if (argc < 1)
     return;
 
-  swfdec_as_value_to_integer (cx, &argv[0]);
+  swfdec_as_value_to_integer (cx, *&argv[0]);
   swfdec_as_value_to_number (cx, *&argv[0]);
   swfdec_as_value_to_string (cx, argv[0]);
 
diff --git a/test/swfdec_test_buffer.c b/test/swfdec_test_buffer.c
index 97d4dd8..733209c 100644
--- a/test/swfdec_test_buffer.c
+++ b/test/swfdec_test_buffer.c
@@ -274,7 +274,7 @@ swfdec_test_buffer_from_args (SwfdecAsContext *cx, guint argc, SwfdecAsValue *ar
 	b = swfdec_buffer_ref (SWFDEC_TEST_BUFFER (o->relay)->buffer);
     } else if (SWFDEC_AS_VALUE_IS_NUMBER (argv[i])) {
       b = swfdec_buffer_new (1);
-      b->data[0] = swfdec_as_value_to_integer (cx, &argv[i]);
+      b->data[0] = swfdec_as_value_to_integer (cx, argv[i]);
     }
     if (b == NULL) {
       const char *s = swfdec_as_value_to_string (cx, argv[i]);
commit fa07d8c324e6d991bcee071d5c36151c6ca7e486
Author: Benjamin Otte <otte at gnome.org>
Date:   Thu Nov 6 13:33:51 2008 +0100

    convert swfdec_as_value_to_number() to use a SwfdecValue

diff --git a/swfdec/swfdec_as_array.c b/swfdec/swfdec_as_array.c
index e1a42e9..a210916 100644
--- a/swfdec/swfdec_as_array.c
+++ b/swfdec/swfdec_as_array.c
@@ -873,8 +873,8 @@ swfdec_as_array_sort_compare_values (SwfdecAsContext *cx,
     } else if (!SWFDEC_AS_VALUE_IS_NUMBER (*b)) {
       retval = -1;
     } else {
-      double an = swfdec_as_value_to_number (cx, a);
-      double bn = swfdec_as_value_to_number (cx, b);
+      double an = swfdec_as_value_to_number (cx, *a);
+      double bn = swfdec_as_value_to_number (cx, *b);
       retval = (an < bn ? -1 : (an > bn ? 1 : 0));
     }
   }
diff --git a/swfdec/swfdec_as_context.c b/swfdec/swfdec_as_context.c
index 011c99d..f7e6ce6 100644
--- a/swfdec/swfdec_as_context.c
+++ b/swfdec/swfdec_as_context.c
@@ -1118,7 +1118,7 @@ swfdec_as_context_isFinite (SwfdecAsContext *cx, SwfdecAsObject *object,
   if (argc < 1)
     return;
 
-  d = swfdec_as_value_to_number (cx, &argv[0]);
+  d = swfdec_as_value_to_number (cx, *&argv[0]);
   SWFDEC_AS_VALUE_SET_BOOLEAN (retval, isfinite (d) ? TRUE : FALSE);
 }
 
@@ -1132,7 +1132,7 @@ swfdec_as_context_isNaN (SwfdecAsContext *cx, SwfdecAsObject *object,
   if (argc < 1)
     return;
 
-  d = swfdec_as_value_to_number (cx, &argv[0]);
+  d = swfdec_as_value_to_number (cx, *&argv[0]);
   SWFDEC_AS_VALUE_SET_BOOLEAN (retval, isnan (d) ? TRUE : FALSE);
 }
 
diff --git a/swfdec/swfdec_as_date.c b/swfdec/swfdec_as_date.c
index be5263a..ef738de 100644
--- a/swfdec/swfdec_as_date.c
+++ b/swfdec/swfdec_as_date.c
@@ -250,7 +250,7 @@ static gboolean
 swfdec_as_date_value_to_number_and_integer_floor (SwfdecAsContext *context,
     const SwfdecAsValue *value, double *d, int *num)
 {
-  *d = swfdec_as_value_to_number (context, value);
+  *d = swfdec_as_value_to_number (context, *value);
   if (!isfinite (*d)) {
     *num = 0;
     return FALSE;
@@ -272,7 +272,7 @@ swfdec_as_date_value_to_number_and_integer (SwfdecAsContext *context,
   if (SWFDEC_AS_VALUE_IS_UNDEFINED (*value)) {
     *d = NAN;
   } else {
-    *d = swfdec_as_value_to_number (context, value);
+    *d = swfdec_as_value_to_number (context, *value);
   }
   if (!isfinite (*d)) {
     *num = 0;
@@ -444,7 +444,7 @@ swfdec_as_date_set_field (SwfdecAsContext *cx, SwfdecAsObject *object,
   SWFDEC_AS_CHECK (SWFDEC_TYPE_AS_DATE, &date, "");
 
   if (!swfdec_as_date_is_valid (date))
-    swfdec_as_value_to_number (cx, &argv[0]); // calls valueOf
+    swfdec_as_value_to_number (cx, *&argv[0]); // calls valueOf
 
   if (swfdec_as_date_is_valid (date) && argc > 0)
   {
@@ -764,7 +764,7 @@ swfdec_as_date_setTime (SwfdecAsContext *cx, SwfdecAsObject *object,
 
   if (argc > 0 &&
       (cx->version > 6 || !SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]))) {
-    d = swfdec_as_value_to_number (cx, &argv[0]);
+    d = swfdec_as_value_to_number (cx, *&argv[0]);
   } else {
     d = NAN;
   }
@@ -1096,7 +1096,7 @@ swfdec_as_date_construct (SwfdecAsContext *cx, SwfdecAsObject *object,
   else if (argc == 1) // milliseconds from epoch, local
   {
     // need to save directly to keep fractions of a milliseconds
-    date->milliseconds = swfdec_as_value_to_number (cx, &argv[0]);
+    date->milliseconds = swfdec_as_value_to_number (cx, *&argv[0]);
   }
   else // year, month etc. local
   {
diff --git a/swfdec/swfdec_as_interpret.c b/swfdec/swfdec_as_interpret.c
index 9669a5b..6124210 100644
--- a/swfdec/swfdec_as_interpret.c
+++ b/swfdec/swfdec_as_interpret.c
@@ -173,7 +173,7 @@ swfdec_value_to_frame (SwfdecAsContext *cx, SwfdecSpriteMovie *movie, SwfdecAsVa
       SWFDEC_ERROR ("FIXME: handle targets");
     }
     /* treat valid encoded numbers as numbers, otherwise assume it's a frame label */
-    d = swfdec_as_value_to_number (cx, val);
+    d = swfdec_as_value_to_number (cx, *val);
     if (isnan (d))
       frame = swfdec_sprite_get_frame (movie->sprite, name) + 1;
     else
@@ -915,8 +915,8 @@ swfdec_action_binary (SwfdecAsContext *cx, guint action, const guint8 *data, gui
 {
   double l, r;
 
-  r = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 1));
-  l = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 2));
+  r = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 1));
+  l = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 2));
   switch (action) {
     case SWFDEC_AS_ACTION_ADD:
       l = l + r;
@@ -996,8 +996,8 @@ swfdec_action_add2 (SwfdecAsContext *cx, guint action, const guint8 *data, guint
     SWFDEC_AS_VALUE_SET_STRING (swfdec_as_stack_peek (cx, 1), lstr);
   } else {
     double d, d2;
-    d = swfdec_as_value_to_number (cx, lval);
-    d2 = swfdec_as_value_to_number (cx, rval);
+    d = swfdec_as_value_to_number (cx, *lval);
+    d2 = swfdec_as_value_to_number (cx, *rval);
     d += d2;
     swfdec_as_stack_pop (cx);
     swfdec_as_value_set_number (cx, swfdec_as_stack_peek (cx, 1), d);
@@ -1058,8 +1058,8 @@ swfdec_action_new_comparison (SwfdecAsContext *cx, guint action, const guint8 *d
     return;
   }
   /* convert to numbers and compare those */
-  l = swfdec_as_value_to_number (cx, lval);
-  r = swfdec_as_value_to_number (cx, rval);
+  l = swfdec_as_value_to_number (cx, *lval);
+  r = swfdec_as_value_to_number (cx, *rval);
   swfdec_as_stack_pop (cx);
   /* NaN results in undefined */
   if (isnan (l) || isnan (r)) {
@@ -1073,7 +1073,7 @@ static void
 swfdec_action_not (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
 {
   if (cx->version <= 4) {
-    double d = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 1));
+    double d = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 1));
     swfdec_as_value_set_number (cx, swfdec_as_stack_peek (cx, 1), d == 0 ? 1 : 0);
   } else {
     SWFDEC_AS_VALUE_SET_BOOLEAN (swfdec_as_stack_peek (cx, 1), 
@@ -1114,7 +1114,7 @@ swfdec_action_decrement (SwfdecAsContext *cx, guint action, const guint8 *data,
   SwfdecAsValue *val;
 
   val = swfdec_as_stack_peek (cx, 1);
-  swfdec_as_value_set_number (cx, val, swfdec_as_value_to_number (cx, val) - 1);
+  swfdec_as_value_set_number (cx, val, swfdec_as_value_to_number (cx, *val) - 1);
 }
 
 static void
@@ -1123,7 +1123,7 @@ swfdec_action_increment (SwfdecAsContext *cx, guint action, const guint8 *data,
   SwfdecAsValue *val;
 
   val = swfdec_as_stack_peek (cx, 1);
-  swfdec_as_value_set_number (cx, val, swfdec_as_value_to_number (cx, val) + 1);
+  swfdec_as_value_set_number (cx, val, swfdec_as_value_to_number (cx, *val) + 1);
 }
 
 static void
@@ -1319,8 +1319,8 @@ swfdec_action_old_compare (SwfdecAsContext *cx, guint action, const guint8 *data
   double l, r;
   gboolean cond;
 
-  l = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 2));
-  r = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 1));
+  l = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 2));
+  r = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 1));
   switch (action) {
     case SWFDEC_AS_ACTION_EQUALS:
       cond = l == r;
@@ -1458,14 +1458,14 @@ swfdec_action_equals2_5 (SwfdecAsContext *cx, guint action, const guint8 *data,
 
   /* convert to numbers */
   if (SWFDEC_AS_VALUE_IS_OBJECT (ltmp)) {
-    l = swfdec_as_value_to_number (cx, lval);
+    l = swfdec_as_value_to_number (cx, *lval);
   } else {
-    l = swfdec_as_value_to_number (cx, &ltmp);
+    l = swfdec_as_value_to_number (cx, *&ltmp);
   }
   if (SWFDEC_AS_VALUE_IS_OBJECT (rtmp)) {
-    r = swfdec_as_value_to_number (cx, rval);
+    r = swfdec_as_value_to_number (cx, *rval);
   } else {
-    r = swfdec_as_value_to_number (cx, &rtmp);
+    r = swfdec_as_value_to_number (cx, *&rtmp);
   }
 
   /* get rid of undefined and null */
@@ -1540,8 +1540,8 @@ swfdec_action_equals2_6 (SwfdecAsContext *cx, guint action, const guint8 *data,
   }
 
   /* else compare as numbers */
-  l = swfdec_as_value_to_number (cx, lval);
-  r = swfdec_as_value_to_number (cx, rval);
+  l = swfdec_as_value_to_number (cx, *lval);
+  r = swfdec_as_value_to_number (cx, *rval);
 
   if (isnan (l) && isnan (r)) {
     cond = (ltype == SWFDEC_AS_TYPE_NUMBER && *lval == *rval);
@@ -1662,12 +1662,12 @@ swfdec_action_start_drag (SwfdecAsContext *cx, guint action, const guint8 *data,
 
   swfdec_as_stack_ensure_size (cx, 3);
   center = swfdec_as_value_to_boolean (cx, *swfdec_as_stack_peek (cx, 2));
-  if (swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 3))) {
+  if (swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 3))) {
     swfdec_as_stack_ensure_size (cx, 7);
-    rect.x0 = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 7));
-    rect.y0 = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 6));
-    rect.x1 = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 5));
-    rect.y1 = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 4));
+    rect.x0 = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 7));
+    rect.y0 = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 6));
+    rect.x1 = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 5));
+    rect.y1 = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 4));
     swfdec_rect_scale (&rect, &rect, SWFDEC_TWIPS_SCALE_FACTOR);
     stack_size = 7;
     rectp = &rect;
@@ -2110,8 +2110,8 @@ swfdec_action_modulo (SwfdecAsContext *cx, guint action, const guint8 *data, gui
 {
   double x, y;
 
-  y = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 1));
-  x = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 2));
+  y = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 1));
+  x = swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 2));
   /* yay, we're portable! */
   if (y == 0.0) {
     x = NAN;
@@ -2136,7 +2136,7 @@ static void
 swfdec_action_to_number (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
 {
   swfdec_as_value_set_number (cx, swfdec_as_stack_peek (cx, 1),
-      swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 1)));
+      swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 1)));
 }
 
 static void
@@ -2460,11 +2460,11 @@ swfdec_action_logical (SwfdecAsContext *cx, guint action, const guint8 *data, gu
   gboolean l, r;
 
   if (cx->version <= 4) {
-    l = (swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 1)) != 0);
+    l = (swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 1)) != 0);
     // don't call second parameter if not necessary
     if ((action == SWFDEC_AS_ACTION_AND && !l) ||
 	(action != SWFDEC_AS_ACTION_AND && l)) {
-      r = (swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 2)) != 0);
+      r = (swfdec_as_value_to_number (cx, *swfdec_as_stack_peek (cx, 2)) != 0);
     } else {
       r = FALSE;
     }
diff --git a/swfdec/swfdec_as_native_function.c b/swfdec/swfdec_as_native_function.c
index 3ad0379..71c5f8b 100644
--- a/swfdec/swfdec_as_native_function.c
+++ b/swfdec/swfdec_as_native_function.c
@@ -352,7 +352,7 @@ swfdec_as_native_function_checkv (SwfdecAsContext *cx, SwfdecAsObject *object,
       case 'n':
 	{
 	  double *d = va_arg (varargs, double *);
-	  *d = swfdec_as_value_to_number (cx, &argv[i]);
+	  *d = swfdec_as_value_to_number (cx, *&argv[i]);
 	}
 	break;
       case 's':
diff --git a/swfdec/swfdec_as_number.c b/swfdec/swfdec_as_number.c
index fae652f..13b27a8 100644
--- a/swfdec/swfdec_as_number.c
+++ b/swfdec/swfdec_as_number.c
@@ -53,7 +53,7 @@ swfdec_as_number_construct (SwfdecAsContext *cx, SwfdecAsObject *object,
   double d;
 
   if (argc > 0) {
-    d = swfdec_as_value_to_number (cx, &argv[0]);
+    d = swfdec_as_value_to_number (cx, *&argv[0]);
   } else {
     d = 0;
   }
diff --git a/swfdec/swfdec_as_types.c b/swfdec/swfdec_as_types.c
index d8e554b..ac3ce47 100644
--- a/swfdec/swfdec_as_types.c
+++ b/swfdec/swfdec_as_types.c
@@ -448,23 +448,20 @@ swfdec_as_value_to_string (SwfdecAsContext *context, SwfdecAsValue value)
  * Returns: a double value. It can be NaN or +-Infinity. It will not be -0.0.
  **/
 double
-swfdec_as_value_to_number (SwfdecAsContext *context, const SwfdecAsValue *value)
+swfdec_as_value_to_number (SwfdecAsContext *context, SwfdecAsValue value)
 {
-  SwfdecAsValue tmp;
-
   g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), 0.0);
 
-  tmp = *value;
-  swfdec_as_value_to_primitive (&tmp);
+  swfdec_as_value_to_primitive (&value);
 
-  switch (SWFDEC_AS_VALUE_GET_TYPE (tmp)) {
+  switch (SWFDEC_AS_VALUE_GET_TYPE (value)) {
     case SWFDEC_AS_TYPE_UNDEFINED:
     case SWFDEC_AS_TYPE_NULL:
       return (context->version >= 7) ? NAN : 0.0;
     case SWFDEC_AS_TYPE_BOOLEAN:
-      return SWFDEC_AS_VALUE_GET_BOOLEAN (tmp) ? 1 : 0;
+      return SWFDEC_AS_VALUE_GET_BOOLEAN (value) ? 1 : 0;
     case SWFDEC_AS_TYPE_NUMBER:
-      return SWFDEC_AS_VALUE_GET_NUMBER (tmp);
+      return SWFDEC_AS_VALUE_GET_NUMBER (value);
     case SWFDEC_AS_TYPE_STRING:
       {
 	const char *s;
@@ -472,7 +469,7 @@ swfdec_as_value_to_number (SwfdecAsContext *context, const SwfdecAsValue *value)
 	double d;
 	
 	// FIXME: We should most likely copy Tamarin's code here (MathUtils.cpp)
-	s = SWFDEC_AS_VALUE_GET_STRING (tmp);
+	s = SWFDEC_AS_VALUE_GET_STRING (value);
 	if (s == SWFDEC_AS_STR_EMPTY)
 	  return (context->version >= 5) ? NAN : 0.0;
 	if (context->version > 5 && s[0] == '0' &&
@@ -540,7 +537,7 @@ swfdec_as_value_to_integer (SwfdecAsContext *context, const SwfdecAsValue *value
 {
   double d;
   
-  d = swfdec_as_value_to_number (context, value);
+  d = swfdec_as_value_to_number (context, *value);
   return swfdec_as_double_to_integer (d);
 }
 
@@ -630,7 +627,7 @@ swfdec_as_value_to_boolean (SwfdecAsContext *context, SwfdecAsValue value)
       }
     case SWFDEC_AS_TYPE_STRING:
       if (context->version <= 6) {
-	double d = swfdec_as_value_to_number (context, &value);
+	double d = swfdec_as_value_to_number (context, *&value);
 	return d != 0.0 && !isnan (d);
       } else {
 	return SWFDEC_AS_VALUE_GET_STRING (value) != SWFDEC_AS_STR_EMPTY;
@@ -709,7 +706,7 @@ swfdec_as_value_to_twips (SwfdecAsContext *context, const SwfdecAsValue *val,
   if (SWFDEC_AS_VALUE_IS_UNDEFINED (*val) || SWFDEC_AS_VALUE_IS_NULL (*val))
     return FALSE;
 
-  d = swfdec_as_value_to_number (context, val);
+  d = swfdec_as_value_to_number (context, *val);
   if (isnan (d))
     return FALSE;
   if (is_length && d < 0)
diff --git a/swfdec/swfdec_as_types.h b/swfdec/swfdec_as_types.h
index c28644e..46100ba 100644
--- a/swfdec/swfdec_as_types.h
+++ b/swfdec/swfdec_as_types.h
@@ -123,7 +123,7 @@ gboolean	swfdec_as_value_to_boolean	(SwfdecAsContext *	context,
 int		swfdec_as_value_to_integer	(SwfdecAsContext *	context,
 						 const SwfdecAsValue *	value);
 double		swfdec_as_value_to_number	(SwfdecAsContext *	context,
-						 const SwfdecAsValue *	value);
+						 SwfdecAsValue		value);
 SwfdecAsObject *swfdec_as_value_to_object	(SwfdecAsContext *	context,
 						 const SwfdecAsValue *	value);
 void		swfdec_as_value_to_primitive	(SwfdecAsValue *	value);
diff --git a/swfdec/swfdec_color_as.c b/swfdec/swfdec_color_as.c
index ce8bb30..6e320bb 100644
--- a/swfdec/swfdec_color_as.c
+++ b/swfdec/swfdec_color_as.c
@@ -135,7 +135,7 @@ parse_property (SwfdecAsObject *obj, const char *name, int *target, gboolean sca
 
   if (!swfdec_as_object_get_variable (obj, name, &val))
     return;
-  d = swfdec_as_value_to_number (obj->context, &val);
+  d = swfdec_as_value_to_number (obj->context, *&val);
   if (scale) {
     *target = d * 256.0 / 100.0;
   } else {
diff --git a/swfdec/swfdec_color_matrix_filter_as.c b/swfdec/swfdec_color_matrix_filter_as.c
index 726e123..431b427 100644
--- a/swfdec/swfdec_color_matrix_filter_as.c
+++ b/swfdec/swfdec_color_matrix_filter_as.c
@@ -69,7 +69,7 @@ swfdec_color_matrix_filter_do_set_matrix (SwfdecColorMatrixFilter *cm,
     if (!swfdec_as_object_get_variable (array, swfdec_as_integer_to_string (cx, i), &val)) {
       cm->matrix[i] = 0;
     } else {
-      cm->matrix[i] = swfdec_as_value_to_number (cx, &val);
+      cm->matrix[i] = swfdec_as_value_to_number (cx, *&val);
     }
   }
 }
diff --git a/swfdec/swfdec_movie_as_drawing.c b/swfdec/swfdec_movie_as_drawing.c
index ef041a7..cbf888a 100644
--- a/swfdec/swfdec_movie_as_drawing.c
+++ b/swfdec/swfdec_movie_as_drawing.c
@@ -138,15 +138,15 @@ swfdec_sprite_movie_extract_matrix (SwfdecAsObject *o, cairo_matrix_t *mat)
       double x, y, w, h, r;
       cairo_matrix_t input;
       swfdec_as_object_get_variable (o, SWFDEC_AS_STR_x, &val);
-      x = swfdec_as_value_to_number (cx, &val);
+      x = swfdec_as_value_to_number (cx, *&val);
       swfdec_as_object_get_variable (o, SWFDEC_AS_STR_y, &val);
-      y = swfdec_as_value_to_number (cx, &val);
+      y = swfdec_as_value_to_number (cx, *&val);
       swfdec_as_object_get_variable (o, SWFDEC_AS_STR_w, &val);
-      w = swfdec_as_value_to_number (cx, &val);
+      w = swfdec_as_value_to_number (cx, *&val);
       swfdec_as_object_get_variable (o, SWFDEC_AS_STR_h, &val);
-      h = swfdec_as_value_to_number (cx, &val);
+      h = swfdec_as_value_to_number (cx, *&val);
       swfdec_as_object_get_variable (o, SWFDEC_AS_STR_r, &val);
-      r = swfdec_as_value_to_number (cx, &val);
+      r = swfdec_as_value_to_number (cx, *&val);
       cairo_matrix_init_translate (&input, (x + w) / 2, (y + h) / 2);
       cairo_matrix_scale (&input, w, h);
       cairo_matrix_rotate (&input, r);
@@ -160,17 +160,17 @@ swfdec_sprite_movie_extract_matrix (SwfdecAsObject *o, cairo_matrix_t *mat)
   } else {
     cairo_matrix_t input;
     swfdec_as_object_get_variable (o, SWFDEC_AS_STR_a, &val);
-    input.xx = swfdec_as_value_to_number (cx, &val);
+    input.xx = swfdec_as_value_to_number (cx, *&val);
     swfdec_as_object_get_variable (o, SWFDEC_AS_STR_b, &val);
-    input.yx = swfdec_as_value_to_number (cx, &val);
+    input.yx = swfdec_as_value_to_number (cx, *&val);
     swfdec_as_object_get_variable (o, SWFDEC_AS_STR_d, &val);
-    input.xy = swfdec_as_value_to_number (cx, &val);
+    input.xy = swfdec_as_value_to_number (cx, *&val);
     swfdec_as_object_get_variable (o, SWFDEC_AS_STR_e, &val);
-    input.yy = swfdec_as_value_to_number (cx, &val);
+    input.yy = swfdec_as_value_to_number (cx, *&val);
     swfdec_as_object_get_variable (o, SWFDEC_AS_STR_g, &val);
-    input.x0 = swfdec_as_value_to_number (cx, &val) * SWFDEC_TWIPS_SCALE_FACTOR;
+    input.x0 = swfdec_as_value_to_number (cx, *&val) * SWFDEC_TWIPS_SCALE_FACTOR;
     swfdec_as_object_get_variable (o, SWFDEC_AS_STR_h, &val);
-    input.y0 = swfdec_as_value_to_number (cx, &val) * SWFDEC_TWIPS_SCALE_FACTOR;
+    input.y0 = swfdec_as_value_to_number (cx, *&val) * SWFDEC_TWIPS_SCALE_FACTOR;
     cairo_matrix_init_scale (mat, SWFDEC_TWIPS_SCALE_FACTOR / 32768.0, SWFDEC_TWIPS_SCALE_FACTOR / 32768.0);
     cairo_matrix_multiply (mat, mat, &input);
   }
diff --git a/swfdec/swfdec_movie_asprops.c b/swfdec/swfdec_movie_asprops.c
index 36f5dcd..59e4847 100644
--- a/swfdec/swfdec_movie_asprops.c
+++ b/swfdec/swfdec_movie_asprops.c
@@ -98,7 +98,7 @@ mc_xscale_set (SwfdecMovie *movie, const SwfdecAsValue *val)
 {
   double d;
 
-  d = swfdec_as_value_to_number (swfdec_gc_object_get_context (movie), val);
+  d = swfdec_as_value_to_number (swfdec_gc_object_get_context (movie), *val);
   if (!isfinite (d)) {
     SWFDEC_WARNING ("trying to set xscale to a non-finite value, ignoring");
     return;
@@ -122,7 +122,7 @@ mc_yscale_set (SwfdecMovie *movie, const SwfdecAsValue *val)
 {
   double d;
 
-  d = swfdec_as_value_to_number (swfdec_gc_object_get_context (movie), val);
+  d = swfdec_as_value_to_number (swfdec_gc_object_get_context (movie), *val);
   if (!isfinite (d)) {
     SWFDEC_WARNING ("trying to set yscale to a non-finite value, ignoring");
     return;
@@ -160,7 +160,7 @@ mc_alpha_set (SwfdecMovie *movie, const SwfdecAsValue *val)
   double d;
   int alpha;
 
-  d = swfdec_as_value_to_number (swfdec_gc_object_get_context (movie), val);
+  d = swfdec_as_value_to_number (swfdec_gc_object_get_context (movie), *val);
   if (!isfinite (d)) {
     SWFDEC_WARNING ("trying to set alpha to a non-finite value, ignoring");
     return;
@@ -209,7 +209,7 @@ mc_width_set (SwfdecMovie *movie, const SwfdecAsValue *val)
   /* property was readonly in Flash 4 and before */
   if (swfdec_gc_object_get_context (movie)->version < 5)
     return;
-  d = swfdec_as_value_to_number (swfdec_gc_object_get_context (movie), val);
+  d = swfdec_as_value_to_number (swfdec_gc_object_get_context (movie), *val);
   if (!isfinite (d)) {
     SWFDEC_WARNING ("trying to set width to a non-finite value, ignoring");
     return;
@@ -251,7 +251,7 @@ mc_height_set (SwfdecMovie *movie, const SwfdecAsValue *val)
   /* property was readonly in Flash 4 and before */
   if (swfdec_gc_object_get_context (movie)->version < 5)
     return;
-  d = swfdec_as_value_to_number (swfdec_gc_object_get_context (movie), val);
+  d = swfdec_as_value_to_number (swfdec_gc_object_get_context (movie), *val);
   if (!isfinite (d)) {
     SWFDEC_WARNING ("trying to set height to a non-finite value, ignoring");
     return;
@@ -286,7 +286,7 @@ mc_rotation_set (SwfdecMovie *movie, const SwfdecAsValue *val)
   double d;
 
   /* FIXME: Flash 4 handles this differently */
-  d = swfdec_as_value_to_number (swfdec_gc_object_get_context (movie), val);
+  d = swfdec_as_value_to_number (swfdec_gc_object_get_context (movie), *val);
   if (isnan (d)) {
     SWFDEC_WARNING ("setting rotation to NaN - not allowed");
     return;
@@ -429,7 +429,7 @@ mc_focusrect_set (SwfdecMovie *movie, const SwfdecAsValue *val)
     b = SWFDEC_FLASH_MAYBE;
   } else {
     if (movie->parent == NULL) {
-      double d = swfdec_as_value_to_number (cx, val);
+      double d = swfdec_as_value_to_number (cx, *val);
       if (isnan (d))
 	return;
       b = d ? SWFDEC_FLASH_YES : SWFDEC_FLASH_NO;
diff --git a/swfdec/swfdec_sprite_movie_as.c b/swfdec/swfdec_sprite_movie_as.c
index c8a447b..c0586e2 100644
--- a/swfdec/swfdec_sprite_movie_as.c
+++ b/swfdec/swfdec_sprite_movie_as.c
@@ -641,10 +641,10 @@ swfdec_sprite_movie_startDrag (SwfdecAsContext *cx, SwfdecAsObject *object,
   }
   if (argc >= 5) {
     SwfdecRect rect;
-    rect.x0 = swfdec_as_value_to_number (cx, &argv[1]);
-    rect.y0 = swfdec_as_value_to_number (cx, &argv[2]);
-    rect.x1 = swfdec_as_value_to_number (cx, &argv[3]);
-    rect.y1 = swfdec_as_value_to_number (cx, &argv[4]);
+    rect.x0 = swfdec_as_value_to_number (cx, *&argv[1]);
+    rect.y0 = swfdec_as_value_to_number (cx, *&argv[2]);
+    rect.x1 = swfdec_as_value_to_number (cx, *&argv[3]);
+    rect.y1 = swfdec_as_value_to_number (cx, *&argv[4]);
     swfdec_rect_scale (&rect, &rect, SWFDEC_TWIPS_SCALE_FACTOR);
     swfdec_player_set_drag_movie (player, actor, center, &rect);
   } else {
diff --git a/swfdec/swfdec_text_field_movie_as.c b/swfdec/swfdec_text_field_movie_as.c
index 6c518af..39356bf 100644
--- a/swfdec/swfdec_text_field_movie_as.c
+++ b/swfdec/swfdec_text_field_movie_as.c
@@ -62,7 +62,7 @@ swfdec_text_field_movie_set_readonly (SwfdecAsContext *cx,
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "");
 
   if (argc > 0)
-    swfdec_as_value_to_number (cx, &argv[0]);
+    swfdec_as_value_to_number (cx, *&argv[0]);
 }
 
 /*
@@ -124,7 +124,7 @@ swfdec_text_field_movie_set_html (SwfdecAsContext *cx, SwfdecAsObject *object,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, &argv[0]);
+  swfdec_as_value_to_number (cx, *&argv[0]);
 
   text->html = value;
 
@@ -210,7 +210,7 @@ swfdec_text_field_movie_set_condenseWhite (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, &argv[0]);
+  swfdec_as_value_to_number (cx, *&argv[0]);
 
   text->condense_white = value;
 }
@@ -243,7 +243,7 @@ swfdec_text_field_movie_set_maxChars (SwfdecAsContext *cx,
   if (argc < 1)
     return;
 
-  swfdec_as_value_to_number (cx, &argv[0]);
+  swfdec_as_value_to_number (cx, *&argv[0]);
   text->max_chars = swfdec_as_value_to_integer (cx, &argv[0]);
 }
 
@@ -269,7 +269,7 @@ swfdec_text_field_movie_set_multiline (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, &argv[0]);
+  swfdec_as_value_to_number (cx, *&argv[0]);
 
   text->multiline = value;
 }
@@ -299,7 +299,7 @@ swfdec_text_field_movie_set_restrict (SwfdecAsContext *cx,
   const char *value;
 
   if (argc > 0)
-    swfdec_as_value_to_number (cx, &argv[0]);
+    swfdec_as_value_to_number (cx, *&argv[0]);
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "s", &value);
 
@@ -336,7 +336,7 @@ swfdec_text_field_movie_set_selectable (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, &argv[0]);
+  swfdec_as_value_to_number (cx, *&argv[0]);
 
   text->selectable = value;
 
@@ -368,7 +368,7 @@ swfdec_text_field_movie_do_set_type (SwfdecAsContext *cx,
   const char *value;
 
   if (argc > 0)
-    swfdec_as_value_to_number (cx, &argv[0]);
+    swfdec_as_value_to_number (cx, *&argv[0]);
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "s", &value);
 
@@ -407,7 +407,7 @@ swfdec_text_field_movie_do_set_variable (SwfdecAsContext *cx,
   const char *value;
 
   if (argc > 0)
-    swfdec_as_value_to_number (cx, &argv[0]);
+    swfdec_as_value_to_number (cx, *&argv[0]);
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "s", &value);
 
@@ -477,7 +477,7 @@ swfdec_text_field_movie_set_background (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, &argv[0]);
+  swfdec_as_value_to_number (cx, *&argv[0]);
 
   if (text->background != value) {
     text->background = value;
@@ -540,7 +540,7 @@ swfdec_text_field_movie_set_border (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, &argv[0]);
+  swfdec_as_value_to_number (cx, *&argv[0]);
 
   if (text->border != value) {
     text->border = value;
@@ -673,7 +673,7 @@ swfdec_text_field_movie_set_mouseWheelEnabled (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, &argv[0]);
+  swfdec_as_value_to_number (cx, *&argv[0]);
 
   text->mouse_wheel_enabled = value;
 }
@@ -759,7 +759,7 @@ swfdec_text_field_movie_set_autoSize (SwfdecAsContext *cx,
       text->auto_size = SWFDEC_AUTO_SIZE_NONE;
     }
   } else {
-    swfdec_as_value_to_number (cx, &argv[0]);
+    swfdec_as_value_to_number (cx, *&argv[0]);
     s = swfdec_as_value_to_string (cx, argv[0]);
 
     if (!g_ascii_strcasecmp (s, "left")) {
@@ -796,7 +796,7 @@ swfdec_text_field_movie_set_password (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, &argv[0]);
+  swfdec_as_value_to_number (cx, *&argv[0]);
 
   swfdec_text_layout_set_password (text->layout, value);
   swfdec_movie_invalidate_last (SWFDEC_MOVIE (text));
@@ -825,7 +825,7 @@ swfdec_text_field_movie_set_wordWrap (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, &argv[0]);
+  swfdec_as_value_to_number (cx, *&argv[0]);
 
   swfdec_text_layout_set_word_wrap (text->layout, value);
 }
@@ -855,7 +855,7 @@ swfdec_text_field_movie_set_embedFonts (SwfdecAsContext *cx,
 
   SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, "b", &value);
 
-  swfdec_as_value_to_number (cx, &argv[0]);
+  swfdec_as_value_to_number (cx, *&argv[0]);
 
   if (!text->embed_fonts && value)
     SWFDEC_FIXME ("Using embed fonts in TextField not supported");
@@ -901,7 +901,7 @@ swfdec_text_field_movie_set_styleSheet (SwfdecAsContext *cx,
   if (argc < 1)
     return;
 
-  swfdec_as_value_to_number (cx, &argv[0]);
+  swfdec_as_value_to_number (cx, *&argv[0]);
 
   if (SWFDEC_AS_VALUE_IS_OBJECT (argv[0])) {
     value = SWFDEC_AS_VALUE_GET_OBJECT (argv[0]);
diff --git a/swfdec/swfdec_text_format.c b/swfdec/swfdec_text_format.c
index 43cb5b0..1365822 100644
--- a/swfdec/swfdec_text_format.c
+++ b/swfdec/swfdec_text_format.c
@@ -137,7 +137,7 @@ swfdec_text_format_set_string (SwfdecAsObject *object,
 
   context = swfdec_gc_object_get_context (format);
   swfdec_as_value_to_integer (context, &argv[0]);
-  swfdec_as_value_to_number (context, &argv[0]);
+  swfdec_as_value_to_number (context, *&argv[0]);
   s = swfdec_as_value_to_string (context, argv[0]);
 
   if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]) ||
@@ -189,7 +189,7 @@ swfdec_text_format_set_boolean (SwfdecAsObject *object,
 
   context = swfdec_gc_object_get_context (format);
   swfdec_as_value_to_integer (context, &argv[0]);
-  swfdec_as_value_to_number (context, &argv[0]);
+  swfdec_as_value_to_number (context, *&argv[0]);
   swfdec_as_value_to_string (context, argv[0]);
 
   if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]) ||
@@ -229,7 +229,7 @@ swfdec_text_format_value_to_integer (SwfdecAsContext *cx, SwfdecAsValue *val,
   int n;
 
   n = swfdec_as_value_to_integer (cx, val);
-  d = swfdec_as_value_to_number (cx, val);
+  d = swfdec_as_value_to_number (cx, *val);
   swfdec_as_value_to_string (cx, *val);
 
   if (cx->version >= 8) {
@@ -334,7 +334,7 @@ swfdec_text_format_do_set_align (SwfdecAsContext *cx, SwfdecAsObject *object,
     return;
 
   swfdec_as_value_to_integer (cx, &argv[0]);
-  swfdec_as_value_to_number (cx, &argv[0]);
+  swfdec_as_value_to_number (cx, *&argv[0]);
   s = swfdec_as_value_to_string (cx, argv[0]);
 
   if (!g_ascii_strcasecmp (s, "left")) {
@@ -483,7 +483,7 @@ swfdec_text_format_do_set_display (SwfdecAsContext *cx, SwfdecAsObject *object,
   format = SWFDEC_TEXT_FORMAT (object->relay);
 
   swfdec_as_value_to_integer (cx, &argv[0]);
-  swfdec_as_value_to_number (cx, &argv[0]);
+  swfdec_as_value_to_number (cx, *&argv[0]);
   swfdec_as_value_to_string (cx, argv[0]);
   s = swfdec_as_value_to_string (cx, argv[0]); // oh yes, let's call it twice
 
@@ -621,7 +621,7 @@ swfdec_text_format_do_set_letter_spacing (SwfdecAsContext *cx,
     return;
 
   swfdec_as_value_to_integer (cx, &argv[0]);
-  d = swfdec_as_value_to_number (cx, &argv[0]);
+  d = swfdec_as_value_to_number (cx, *&argv[0]);
   swfdec_as_value_to_string (cx, argv[0]);
 
   if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]) ||
@@ -711,7 +711,7 @@ swfdec_text_format_do_set_tab_stops (SwfdecAsContext *cx,
     return;
 
   swfdec_as_value_to_integer (cx, &argv[0]);
-  swfdec_as_value_to_number (cx, &argv[0]);
+  swfdec_as_value_to_number (cx, *&argv[0]);
   swfdec_as_value_to_string (cx, argv[0]);
 
   if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]) ||
diff --git a/swfdec/swfdec_utils.c b/swfdec/swfdec_utils.c
index 448c7c9..9ce47bb 100644
--- a/swfdec/swfdec_utils.c
+++ b/swfdec/swfdec_utils.c
@@ -85,31 +85,31 @@ swfdec_matrix_from_as_object (cairo_matrix_t *matrix, SwfdecAsObject *object)
 
   val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_a);
   if (val == NULL ||
-      !isfinite (matrix->xx = swfdec_as_value_to_number (cx, val)))
+      !isfinite (matrix->xx = swfdec_as_value_to_number (cx, *val)))
     return FALSE;
   val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_b);
   if (val == NULL ||
-      !isfinite (matrix->yx = swfdec_as_value_to_number (cx, val)))
+      !isfinite (matrix->yx = swfdec_as_value_to_number (cx, *val)))
     return FALSE;
   val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_c);
   if (val == NULL ||
-      !isfinite (matrix->xy = swfdec_as_value_to_number (cx, val)))
+      !isfinite (matrix->xy = swfdec_as_value_to_number (cx, *val)))
     return FALSE;
   val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_d);
   if (val == NULL ||
-      !isfinite (matrix->yy = swfdec_as_value_to_number (cx, val)))
+      !isfinite (matrix->yy = swfdec_as_value_to_number (cx, *val)))
     return FALSE;
 
   val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_tx);
   if (val == NULL)
       return FALSE;
-  matrix->x0 = swfdec_as_value_to_number (cx, val);
+  matrix->x0 = swfdec_as_value_to_number (cx, *val);
   if (!isfinite (matrix->x0))
     matrix->x0 = 0;
   val = swfdec_as_object_peek_variable (object, SWFDEC_AS_STR_ty);
   if (val == NULL)
       return FALSE;
-  matrix->y0 = swfdec_as_value_to_number (cx, val);
+  matrix->y0 = swfdec_as_value_to_number (cx, *val);
   if (!isfinite (matrix->y0))
     matrix->y0 = 0;
 
diff --git a/swfdec/swfdec_xml.c b/swfdec/swfdec_xml.c
index 8e9e3e4..706d920 100644
--- a/swfdec/swfdec_xml.c
+++ b/swfdec/swfdec_xml.c
@@ -354,7 +354,7 @@ swfdec_xml_set_status (SwfdecAsContext *cx, SwfdecAsObject *object,
   if (SWFDEC_AS_VALUE_IS_UNDEFINED (argv[0]))
     return;
 
-  d = swfdec_as_value_to_number (cx, &argv[0]);
+  d = swfdec_as_value_to_number (cx, *&argv[0]);
   if (!isfinite (d))
     xml->status = 0;
   else
commit 50edfd99c413f3e06e46dee25a07bc59ba31b554
Author: Benjamin Otte <otte at gnome.org>
Date:   Thu Nov 6 13:24:48 2008 +0100

    make swfdec_as_value_to_boolean() take a SwfdecAsValue

diff --git a/swfdec/swfdec_as_boolean.c b/swfdec/swfdec_as_boolean.c
index fda7519..e092e4a 100644
--- a/swfdec/swfdec_as_boolean.c
+++ b/swfdec/swfdec_as_boolean.c
@@ -52,7 +52,7 @@ swfdec_as_boolean_construct (SwfdecAsContext *cx, SwfdecAsObject *object,
 {
   if (swfdec_as_context_is_constructing (cx)) {
     SwfdecAsBoolean *b = g_object_new (SWFDEC_TYPE_AS_BOOLEAN, "context", cx, NULL);
-    b->boolean = argc > 0 ? swfdec_as_value_to_boolean (cx, &argv[0]) : FALSE;
+    b->boolean = argc > 0 ? swfdec_as_value_to_boolean (cx, argv[0]) : FALSE;
     swfdec_as_object_set_relay (object, SWFDEC_AS_RELAY (b));
     SWFDEC_AS_VALUE_SET_OBJECT (ret, object);
   } else {
diff --git a/swfdec/swfdec_as_interpret.c b/swfdec/swfdec_as_interpret.c
index dcf0dbb..9669a5b 100644
--- a/swfdec/swfdec_as_interpret.c
+++ b/swfdec/swfdec_as_interpret.c
@@ -1077,7 +1077,7 @@ swfdec_action_not (SwfdecAsContext *cx, guint action, const guint8 *data, guint
     swfdec_as_value_set_number (cx, swfdec_as_stack_peek (cx, 1), d == 0 ? 1 : 0);
   } else {
     SWFDEC_AS_VALUE_SET_BOOLEAN (swfdec_as_stack_peek (cx, 1), 
-	!swfdec_as_value_to_boolean (cx, swfdec_as_stack_peek (cx, 1)));
+	!swfdec_as_value_to_boolean (cx, *swfdec_as_stack_peek (cx, 1)));
   }
 }
 
@@ -1101,7 +1101,7 @@ swfdec_action_if (SwfdecAsContext *cx, guint action, const guint8 *data, guint l
     SWFDEC_ERROR ("If action length invalid (is %u, should be 2)", len);
     return;
   }
-  if (swfdec_as_value_to_boolean (cx, swfdec_as_stack_peek (cx, 1))) {
+  if (swfdec_as_value_to_boolean (cx, *swfdec_as_stack_peek (cx, 1))) {
     gint16 offset = data[0] | (data[1] << 8);
     cx->frame->pc += 5 + (int) offset;
   }
@@ -1661,7 +1661,7 @@ swfdec_action_start_drag (SwfdecAsContext *cx, guint action, const guint8 *data,
   guint stack_size = 3;
 
   swfdec_as_stack_ensure_size (cx, 3);
-  center = swfdec_as_value_to_boolean (cx, swfdec_as_stack_peek (cx, 2));
+  center = swfdec_as_value_to_boolean (cx, *swfdec_as_stack_peek (cx, 2));
   if (swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 3))) {
     swfdec_as_stack_ensure_size (cx, 7);
     rect.x0 = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx, 7));
@@ -2469,8 +2469,8 @@ swfdec_action_logical (SwfdecAsContext *cx, guint action, const guint8 *data, gu
       r = FALSE;
     }
   } else {
-    l = swfdec_as_value_to_boolean (cx, swfdec_as_stack_peek (cx, 1));
-    r = swfdec_as_value_to_boolean (cx, swfdec_as_stack_peek (cx, 2));
+    l = swfdec_as_value_to_boolean (cx, *swfdec_as_stack_peek (cx, 1));
+    r = swfdec_as_value_to_boolean (cx, *swfdec_as_stack_peek (cx, 2));
   }
 
   SWFDEC_AS_VALUE_SET_BOOLEAN (swfdec_as_stack_peek (cx, 2),
diff --git a/swfdec/swfdec_as_native_function.c b/swfdec/swfdec_as_native_function.c
index 7a1684d..3ad0379 100644
--- a/swfdec/swfdec_as_native_function.c
+++ b/swfdec/swfdec_as_native_function.c
@@ -325,7 +325,7 @@ swfdec_as_native_function_checkv (SwfdecAsContext *cx, SwfdecAsObject *object,
       case 'b':
 	{
 	  gboolean *b = va_arg (varargs, gboolean *);
-	  *b = swfdec_as_value_to_boolean (cx, &argv[i]);
+	  *b = swfdec_as_value_to_boolean (cx, argv[i]);
 	}
 	break;
       case 'i':
diff --git a/swfdec/swfdec_as_types.c b/swfdec/swfdec_as_types.c
index 44b8172..d8e554b 100644
--- a/swfdec/swfdec_as_types.c
+++ b/swfdec/swfdec_as_types.c
@@ -612,28 +612,28 @@ swfdec_as_value_to_object (SwfdecAsContext *context, const SwfdecAsValue *value)
 * Returns: either %TRUE or %FALSE.
 **/
 gboolean
-swfdec_as_value_to_boolean (SwfdecAsContext *context, const SwfdecAsValue *value)
+swfdec_as_value_to_boolean (SwfdecAsContext *context, SwfdecAsValue value)
 {
   g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), FALSE);
 
   /* FIXME: what do we do when called in flash 4? */
-  switch (SWFDEC_AS_VALUE_GET_TYPE (*value)) {
+  switch (SWFDEC_AS_VALUE_GET_TYPE (value)) {
     case SWFDEC_AS_TYPE_UNDEFINED:
     case SWFDEC_AS_TYPE_NULL:
       return FALSE;
     case SWFDEC_AS_TYPE_BOOLEAN:
-      return SWFDEC_AS_VALUE_GET_BOOLEAN (*value);
+      return SWFDEC_AS_VALUE_GET_BOOLEAN (value);
     case SWFDEC_AS_TYPE_NUMBER:
       {
-	double d = SWFDEC_AS_VALUE_GET_NUMBER (*value);
+	double d = SWFDEC_AS_VALUE_GET_NUMBER (value);
 	return d != 0.0 && !isnan (d);
       }
     case SWFDEC_AS_TYPE_STRING:
       if (context->version <= 6) {
-	double d = swfdec_as_value_to_number (context, value);
+	double d = swfdec_as_value_to_number (context, &value);
 	return d != 0.0 && !isnan (d);
       } else {
-	return SWFDEC_AS_VALUE_GET_STRING (*value) != SWFDEC_AS_STR_EMPTY;
+	return SWFDEC_AS_VALUE_GET_STRING (value) != SWFDEC_AS_STR_EMPTY;
       }
     case SWFDEC_AS_TYPE_OBJECT:
     case SWFDEC_AS_TYPE_MOVIE:
diff --git a/swfdec/swfdec_as_types.h b/swfdec/swfdec_as_types.h
index 58ae39e..c28644e 100644
--- a/swfdec/swfdec_as_types.h
+++ b/swfdec/swfdec_as_types.h
@@ -119,7 +119,7 @@ void		swfdec_as_value_set_number	(SwfdecAsContext *	context,
 
 /* value conversion functions */
 gboolean	swfdec_as_value_to_boolean	(SwfdecAsContext *	context,
-						 const SwfdecAsValue *	value);
+						 SwfdecAsValue		value);
 int		swfdec_as_value_to_integer	(SwfdecAsContext *	context,
 						 const SwfdecAsValue *	value);
 double		swfdec_as_value_to_number	(SwfdecAsContext *	context,
diff --git a/swfdec/swfdec_movie_asprops.c b/swfdec/swfdec_movie_asprops.c
index 333d4a3..36f5dcd 100644
--- a/swfdec/swfdec_movie_asprops.c
+++ b/swfdec/swfdec_movie_asprops.c
@@ -183,7 +183,7 @@ mc_visible_set (SwfdecMovie *movie, const SwfdecAsValue *val)
 {
   gboolean b;
 
-  b = swfdec_as_value_to_boolean (swfdec_gc_object_get_context (movie), val);
+  b = swfdec_as_value_to_boolean (swfdec_gc_object_get_context (movie), *val);
   if (b != movie->visible) {
     movie->visible = b;
     swfdec_movie_invalidate_last (movie);
@@ -434,7 +434,7 @@ mc_focusrect_set (SwfdecMovie *movie, const SwfdecAsValue *val)
 	return;
       b = d ? SWFDEC_FLASH_YES : SWFDEC_FLASH_NO;
     } else {
-      b = swfdec_as_value_to_boolean (cx, val) ? SWFDEC_FLASH_YES : SWFDEC_FLASH_NO;
+      b = swfdec_as_value_to_boolean (cx, *val) ? SWFDEC_FLASH_YES : SWFDEC_FLASH_NO;
     }
   }
 
diff --git a/swfdec/swfdec_net_stream_as.c b/swfdec/swfdec_net_stream_as.c
index f69369c..60d500f 100644
--- a/swfdec/swfdec_net_stream_as.c
+++ b/swfdec/swfdec_net_stream_as.c
@@ -69,7 +69,7 @@ swfdec_net_stream_pause (SwfdecAsContext *cx, SwfdecAsObject *object,
   if (argc == 0) {
     playing = !swfdec_net_stream_get_playing (stream);
   } else {
-    playing = !swfdec_as_value_to_boolean (cx, &argv[0]);
+    playing = !swfdec_as_value_to_boolean (cx, argv[0]);
   }
   SWFDEC_LOG ("%s stream %p", playing ? "playing" : "pausing", stream);
   swfdec_net_stream_set_playing (stream, playing);
diff --git a/swfdec/swfdec_player.c b/swfdec/swfdec_player.c
index 35e2d0f..0696cb4 100644
--- a/swfdec/swfdec_player.c
+++ b/swfdec/swfdec_player.c
@@ -1510,7 +1510,7 @@ swfdec_player_get_tab_movies (SwfdecPlayer *player, const GList *current)
 	ret = g_list_prepend (ret, actor);
     } else if (SWFDEC_MOVIE (actor)->parent != NULL) {
       swfdec_as_object_get_variable (object, SWFDEC_AS_STR_tabEnabled, &val);
-      if (swfdec_as_value_to_boolean (SWFDEC_AS_CONTEXT (player), &val)) {
+      if (swfdec_as_value_to_boolean (SWFDEC_AS_CONTEXT (player), val)) {
 	/* Flash queries again - why not? :/ */
 	swfdec_as_object_get_variable (object, SWFDEC_AS_STR_tabEnabled, &val);
 	ret = g_list_prepend (ret, actor);
@@ -1526,7 +1526,7 @@ swfdec_player_get_tab_movies (SwfdecPlayer *player, const GList *current)
       swfdec_as_object_get_variable (object, SWFDEC_AS_STR_tabChildren, &val);
 
     if (SWFDEC_AS_VALUE_IS_UNDEFINED (val) ||
-	swfdec_as_value_to_boolean (SWFDEC_AS_CONTEXT (player), &val)) {
+	swfdec_as_value_to_boolean (SWFDEC_AS_CONTEXT (player), val)) {
       GList *list;
       swfdec_sandbox_unuse (SWFDEC_MOVIE (actor)->resource->sandbox);
       list = swfdec_player_get_tab_movies (player, SWFDEC_MOVIE (actor)->list);
diff --git a/swfdec/swfdec_selection.c b/swfdec/swfdec_selection.c
index 2fa2c85..14205e5 100644
--- a/swfdec/swfdec_selection.c
+++ b/swfdec/swfdec_selection.c
@@ -120,7 +120,7 @@ swfdec_actor_can_grab_focus (SwfdecActor *actor)
     if (!swfdec_as_object_get_variable (swfdec_as_relay_get_as_object (SWFDEC_AS_RELAY (actor)),
 	SWFDEC_AS_STR_focusEnabled, &val))
       return swfdec_actor_get_mouse_events (actor);
-    return swfdec_as_value_to_boolean (swfdec_gc_object_get_context (actor), &val);
+    return swfdec_as_value_to_boolean (swfdec_gc_object_get_context (actor), val);
   } else if (SWFDEC_IS_TEXT_FIELD_MOVIE (actor)) {
     /* cool that you can select all textfields, eh? */
     return TRUE;
diff --git a/swfdec/swfdec_sprite_movie_as.c b/swfdec/swfdec_sprite_movie_as.c
index 9f8c32f..c8a447b 100644
--- a/swfdec/swfdec_sprite_movie_as.c
+++ b/swfdec/swfdec_sprite_movie_as.c
@@ -637,7 +637,7 @@ swfdec_sprite_movie_startDrag (SwfdecAsContext *cx, SwfdecAsObject *object,
   SWFDEC_AS_CHECK (SWFDEC_TYPE_ACTOR, &actor, "");
 
   if (argc > 0) {
-    center = swfdec_as_value_to_boolean (cx, &argv[0]);
+    center = swfdec_as_value_to_boolean (cx, argv[0]);
   }
   if (argc >= 5) {
     SwfdecRect rect;
diff --git a/swfdec/swfdec_text_format.c b/swfdec/swfdec_text_format.c
index 1187d30..43cb5b0 100644
--- a/swfdec/swfdec_text_format.c
+++ b/swfdec/swfdec_text_format.c
@@ -197,7 +197,7 @@ swfdec_text_format_set_boolean (SwfdecAsObject *object,
     SWFDEC_TEXT_ATTRIBUTE_UNSET (format->values_set, property);
   } else {
     G_STRUCT_MEMBER (gboolean, format, property_offsets[property]) =
-      swfdec_as_value_to_boolean (context, &argv[0]);
+      swfdec_as_value_to_boolean (context, argv[0]);
     SWFDEC_TEXT_ATTRIBUTE_SET (format->values_set, property);
   }
 }
diff --git a/swfdec/swfdec_xml.c b/swfdec/swfdec_xml.c
index 402f6cd..8e9e3e4 100644
--- a/swfdec/swfdec_xml.c
+++ b/swfdec/swfdec_xml.c
@@ -209,7 +209,7 @@ swfdec_xml_set_ignoreWhite (SwfdecAsContext *cx, SwfdecAsObject *object,
     return;
 
   xml->ignore_white =
-    swfdec_as_value_to_boolean (cx, &argv[0]);
+    swfdec_as_value_to_boolean (cx, argv[0]);
 }
 
 static void
@@ -326,7 +326,7 @@ swfdec_xml_set_loaded (SwfdecAsContext *cx, SwfdecAsObject *object,
     return;
 
   SWFDEC_AS_VALUE_SET_BOOLEAN (&xml->loaded,
-      swfdec_as_value_to_boolean (cx, &argv[0]));
+      swfdec_as_value_to_boolean (cx, argv[0]));
 }
 
 static void
commit 97ad53c37e964c81db79ff045fd3ba567e6179d9
Author: Benjamin Otte <otte at gnome.org>
Date:   Thu Nov 6 12:39:52 2008 +0100

    define ECHO, so we don't get bitten by a warning-riddled definition

diff --git a/vivified/code/vivi_parser_scanner_lex.l b/vivified/code/vivi_parser_scanner_lex.l
index 914df8a..b87322e 100644
--- a/vivified/code/vivi_parser_scanner_lex.l
+++ b/vivified/code/vivi_parser_scanner_lex.l
@@ -24,6 +24,9 @@
 extern YY_DECL;
 
 #define YY_EXTRA_TYPE ViviParserScanner *
+
+/* stupid lex can't define it to not throw an unused_result error */
+#define ECHO 
 }
 
 %{
commit 2fb8e2806834ac373bb503c092340438956458bf
Author: Benjamin Otte <otte at gnome.org>
Date:   Thu Nov 6 12:38:36 2008 +0100

    move the whole check into the assertion to avoid unused parameters

diff --git a/swfdec-gtk/swfdec_gtk_widget.c b/swfdec-gtk/swfdec_gtk_widget.c
index 41acca1..cde877f 100644
--- a/swfdec-gtk/swfdec_gtk_widget.c
+++ b/swfdec-gtk/swfdec_gtk_widget.c
@@ -580,9 +580,7 @@ swfdec_gtk_widget_unrealize (GtkWidget *widget)
 static void
 swfdec_gtk_widget_map (GtkWidget *gtkwidget)
 {
-  SwfdecGtkWidgetPrivate *priv = SWFDEC_GTK_WIDGET (gtkwidget)->priv;
-
-  g_assert (gdk_region_empty (priv->invalid));
+  g_assert (gdk_region_empty (SWFDEC_GTK_WIDGET (gtkwidget)->priv->invalid));
 
   GTK_WIDGET_CLASS (swfdec_gtk_widget_parent_class)->map (gtkwidget);
 }
commit 65aaff6f8cb475cfb59ed0138f79b0daeec337d3
Author: Benjamin Otte <otte at gnome.org>
Date:   Thu Nov 6 12:07:21 2008 +0100

    silence gcc

diff --git a/swfdec/swfdec_text_field_movie.c b/swfdec/swfdec_text_field_movie.c
index 572546c..fa1e998 100644
--- a/swfdec/swfdec_text_field_movie.c
+++ b/swfdec/swfdec_text_field_movie.c
@@ -165,6 +165,7 @@ swfdec_text_field_movie_autosize (SwfdecTextFieldMovie *text)
       break;
     case SWFDEC_AUTO_SIZE_NONE:
     default:
+      x0 = 0;
       g_assert_not_reached ();
   }
   z0 = 0;
commit 0b04571626bb0d46c2be91b486f3db1a46212d11
Author: Benjamin Otte <otte at gnome.org>
Date:   Thu Nov 6 12:06:24 2008 +0100

    mark variable as unused (when checks are disabled)

diff --git a/swfdec/swfdec_sprite_movie.c b/swfdec/swfdec_sprite_movie.c
index f64dca2..d8415b3 100644
--- a/swfdec/swfdec_sprite_movie.c
+++ b/swfdec/swfdec_sprite_movie.c
@@ -682,7 +682,7 @@ G_DEFINE_TYPE (SwfdecSpriteMovie, swfdec_sprite_movie, SWFDEC_TYPE_ACTOR)
 static void
 swfdec_sprite_movie_dispose (GObject *object)
 {
-  SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (object);
+  G_GNUC_UNUSED SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (object);
 
   g_assert (movie->sound_stream == NULL);
 
commit 4760ffc1b2194c5b5078804cb88919081b9c7357
Author: Benjamin Otte <otte at gnome.org>
Date:   Thu Nov 6 12:05:26 2008 +0100

    mark variable as unused (when debugging is disabled)

diff --git a/swfdec/swfdec_button.c b/swfdec/swfdec_button.c
index b7c8f33..5eaee0e 100644
--- a/swfdec/swfdec_button.c
+++ b/swfdec/swfdec_button.c
@@ -134,7 +134,7 @@ tag_func_define_button_2 (SwfdecSwfDecoder * s, guint tag)
     guint states, gid;
     gboolean has_blend_mode, has_filters;
 
-    /* we parse the placement info into buffers each containing one palcement */
+    /* we parse the placement info into buffers each containing one placement */
     tmp = bits;
 
     if (s->version >= 8) {
@@ -170,7 +170,7 @@ tag_func_define_button_2 (SwfdecSwfDecoder * s, guint tag)
     if (has_filters)
       swfdec_filter_skip (&bits);
     if (has_blend_mode) {
-      guint blend_mode = swfdec_bits_get_u8 (&bits);
+      G_GNUC_UNUSED guint blend_mode = swfdec_bits_get_u8 (&bits);
       SWFDEC_LOG ("  blend mode = %u", blend_mode);
     }
     buffer = swfdec_bits_get_buffer (&tmp, (swfdec_bits_left (&tmp) - swfdec_bits_left (&bits)) / 8);
commit aaca6905274b4b1fc8bc26d803a2bc02063c2e19
Author: Benjamin Otte <otte at gnome.org>
Date:   Thu Nov 6 12:05:16 2008 +0100

    fix invalid read

diff --git a/swfdec/swfdec_button.c b/swfdec/swfdec_button.c
index 4620156..b7c8f33 100644
--- a/swfdec/swfdec_button.c
+++ b/swfdec/swfdec_button.c
@@ -91,7 +91,7 @@ swfdec_button_translate_conditions (guint conditions, gboolean menu)
   guint i, ret;
 
   ret = 0;
-  for (i = 0; i <= G_N_ELEMENTS (events); i++) {
+  for (i = 0; i < G_N_ELEMENTS (events); i++) {
     if (conditions & (1 << i))
       ret |= events[i][menu ? 1 : 0];
   }
commit 129d5edaad33bd12e30761b0f92bed4359556a1e
Author: Benjamin Otte <otte at gnome.org>
Date:   Thu Nov 6 12:03:08 2008 +0100

    mark variable as unused (when checks are disabled)

diff --git a/swfdec/swfdec_audio.c b/swfdec/swfdec_audio.c
index 260eb42..0722feb 100644
--- a/swfdec/swfdec_audio.c
+++ b/swfdec/swfdec_audio.c
@@ -69,7 +69,7 @@ static guint signals[LAST_SIGNAL] = { 0, };
 static void
 swfdec_audio_dispose (GObject *object)
 {
-  SwfdecAudio *audio = SWFDEC_AUDIO (object);
+  G_GNUC_UNUSED SwfdecAudio *audio = SWFDEC_AUDIO (object);
 
   g_assert (audio->actor == NULL);
   g_assert (audio->player == NULL);


More information about the Swfdec-commits mailing list