search for: swfdec_as_type_object

Displaying 13 results from an estimated 13 matches for "swfdec_as_type_object".

2007 May 29
0
Branch 'as' - 8 commits - libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_math.c libswfdec/swfdec_as_math.h libswfdec/swfdec_as_strings.c libswfdec/swfdec_as_types.c
...fdec/swfdec_as_types.c +++ b/libswfdec/swfdec_as_types.c @@ -257,11 +257,12 @@ swfdec_as_value_to_number (SwfdecAsConte return NAN; d = g_ascii_strtod (s, &end); if (*end == '\0') - return d; + return d == -0.0 ? 0.0 : d; else return NAN; } case SWFDEC_AS_TYPE_OBJECT: + return NAN; default: g_assert_not_reached (); return NAN; @@ -360,10 +361,10 @@ swfdec_as_value_to_boolean (SwfdecAsCont * @context: a #SwfdecAsContext * @value: value to convert * - * Converts the given @value inline to its primitive value. Primitive values - * are...
2007 Apr 12
0
Branch 'as' - 14 commits - libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h
...C_AS_TYPE_NUMBER: return "Number"; - case SWFDEC_TYPE_AS_BOOLEAN: + case SWFDEC_AS_TYPE_BOOLEAN: return "Boolean"; - case SWFDEC_TYPE_AS_STRING: + case SWFDEC_AS_TYPE_STRING: return "String"; - case SWFDEC_TYPE_AS_ASOBJECT: + case SWFDEC_AS_TYPE_OBJECT: /* FIXME: improve */ return "Object"; default: diff-tree cb15af072feee4d0ea3672d283597e1b4ccfefe1 (from ba06192bc917398202563f5c9a00d13ba3aa456f) Author: Benjamin Otte <otte@gnome.org> Date: Thu Apr 12 19:15:17 2007 +0200 That return_if_fail was wr...
2007 Nov 08
0
configure.ac libswfdec-gtk/swfdec_gtk_widget.c libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_as_date.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_audio_flv.c libswfdec/swfdec_audio_flv.h
...wfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 6641d72..2cac041 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -1543,6 +1543,7 @@ swfdec_action_strict_equals (SwfdecAsContext *cx, guint action, const guint8 *da case SWFDEC_AS_TYPE_OBJECT: cond = SWFDEC_AS_VALUE_GET_OBJECT (rval) == SWFDEC_AS_VALUE_GET_OBJECT (lval); break; + case SWFDEC_AS_TYPE_INT: default: g_assert_not_reached (); cond = FALSE; @@ -2132,6 +2133,7 @@ swfdec_action_type_of (SwfdecAsContext *cx, guint action, const guint8 *data, gu } }...
2007 Jun 28
0
Branch 'as' - 4 commits - doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...ll never appear in Swfdec. Using + * it will cause Swfdec to crash. + * @SWFDEC_AS_TYPE_NUMBER: a double value - also used for integer numbers + * @SWFDEC_AS_TYPE_STRING: a string. Strings are garbage-collected and unique. + * @SWFDEC_AS_TYPE_NULL: the spaecial null value + * @SWFDEC_AS_TYPE_OBJECT: an object - must be of type #SwfdecAsObject + * + * These are the possible values the Swfdec Actionscript engine knows about. + */ + +/** + * SwfdecAsValue: + * @type: the type of this value. + * + * This is the type used to present an opaque value in the Actionscript + * engine. See #Swf...
2007 Jul 04
0
Branch 'as' - 25 commits - libswfdec/Makefile.am libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_boolean.h libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c
...(fun, 1, value, TRUE); - swfdec_as_context_run (context); - return ret; - } + s = SWFDEC_AS_STR_String; + break; case SWFDEC_AS_TYPE_BOOLEAN: - SWFDEC_ERROR ("FIXME: implement Boolean"); - return NULL; + s = SWFDEC_AS_STR_Boolean; + break; case SWFDEC_AS_TYPE_OBJECT: return SWFDEC_AS_VALUE_GET_OBJECT (value); default: g_assert_not_reached (); return NULL; } + + swfdec_as_object_get_variable (context->global, s, &val); + if (!SWFDEC_AS_VALUE_IS_OBJECT (&val) || + !SWFDEC_IS_AS_FUNCTION (fun = (SwfdecAsFunction *) S...
2007 May 24
0
Branch 'as' - 11 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_number.c libswfdec/swfdec_as_object.c
...*s; char *end; double d; - s = SWFDEC_AS_VALUE_GET_STRING (value); + s = SWFDEC_AS_VALUE_GET_STRING (&tmp); if (s == SWFDEC_AS_STR_EMPTY) return NAN; d = g_ascii_strtod (s, &end); @@ -257,15 +262,6 @@ swfdec_as_value_to_number (SwfdecAsConte return NAN; } case SWFDEC_AS_TYPE_OBJECT: - { - SwfdecAsValue ret; - swfdec_as_object_call (SWFDEC_AS_VALUE_GET_OBJECT (value), SWFDEC_AS_STR_valueOf, - 0, NULL, &ret); - if (SWFDEC_AS_VALUE_IS_OBJECT (&ret)) - return NAN; - else - return swfdec_as_value_to_number (context, &ret); - } default: g_a...
2007 Aug 24
0
7 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_string.c test/trace
...quot; @@ -552,10 +553,14 @@ swfdec_action_trace (SwfdecAsContext *cx const char *s; val = swfdec_as_stack_peek (cx, 1); - if (val->type == SWFDEC_AS_TYPE_UNDEFINED) + if (val->type == SWFDEC_AS_TYPE_UNDEFINED) { s = SWFDEC_AS_STR_undefined; - else + } else if (val->type == SWFDEC_AS_TYPE_OBJECT && + SWFDEC_IS_AS_STRING (swfdec_as_value_to_object (cx, val))) { + s = SWFDEC_AS_STRING (swfdec_as_value_to_object (cx, val))->string; + } else { s = swfdec_as_value_to_string (cx, val); + } swfdec_as_stack_pop (cx); g_signal_emit_by_name (cx, "trace", s);...
2007 Aug 07
0
13 commits - libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec_gtk_keys.c libswfdec-gtk/swfdec_gtk_keys.h libswfdec-gtk/swfdec_gtk_widget.c libswfdec/Makefile.am libswfdec/swfdec_as_types.c libswfdec/swfdec.h libswfdec/swfdec_initialize.as
...; - return d != 0.0 && !isnan (d); -} -case SWFDEC_AS_TYPE_STRING: -if (context->version <= 6) { - 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; -} -case SWFDEC_AS_TYPE_OBJECT: -return TRUE; -default: -g_assert_not_reached (); -return FALSE; -} + /* FIXME: what do we do when called in flash 4? */ + switch (value->type) { + case SWFDEC_AS_TYPE_UNDEFINED: + case SWFDEC_AS_TYPE_NULL: + return FALSE; + case SWFDEC_AS_TYPE_BOOLEAN: + return SWF...
2007 Aug 15
0
Branch 'vivi' - 13 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_debugger.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_types.h vivified/core vivified/ui
...: + case SWFDEC_AS_TYPE_NUMBER: + case SWFDEC_AS_TYPE_NULL: + *dest = *src; + break; + case SWFDEC_AS_TYPE_STRING: + SWFDEC_AS_VALUE_SET_STRING (dest, + swfdec_as_context_get_string (SWFDEC_AS_CONTEXT (app), + SWFDEC_AS_VALUE_GET_STRING (src))); + break; + case SWFDEC_AS_TYPE_OBJECT: + SWFDEC_AS_VALUE_SET_OBJECT (dest, + vivi_wrap_object (app, SWFDEC_AS_VALUE_GET_OBJECT (src))); + break; + default: + g_assert_not_reached (); + break; + } +} + diff --git a/vivified/core/vivi_wrap.h b/vivified/core/vivi_wrap.h new file mode 10064...
2007 Aug 16
0
Branch 'vivi' - 18 commits - configure.ac doc/swfdec-sections.txt libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_types.h libswfdec/swfdec_player.c vivified/core vivified/ui
...0 @@ struct _SwfdecAsValue { #define SWFDEC_AS_VALUE_GET_OBJECT(val) ((val)->value.object) #define SWFDEC_AS_VALUE_SET_OBJECT(val,o) G_STMT_START { \ SwfdecAsValue *__val = (val); \ - g_assert (o != NULL); \ + SwfdecAsObject *__o = (o); \ + g_assert (__o != NULL); \ (__val)->type = SWFDEC_AS_TYPE_OBJECT; \ - (__val)->value.object = o; \ + (__val)->value.object = __o; \ } G_STMT_END /* value conversion functions */ diff-tree 52bba717bd060881a2f47b202c129017a86bc955 (from 85ec6f14038b68f557c37a8ad23095dca8a9af1f) Author: Benjamin Otte <otte at gnome.org> Date: Thu Aug 16...
2007 Nov 10
0
10 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_movie.c libswfdec/swfdec_movie_clip_loader.c libswfdec/swfdec_movie.h libswfdec/swfdec_resource.c
...EC_IS_MOVIE (lo)) { swfdec_as_value_to_primitive (rval); rtype = rval->type; @@ -1542,7 +1542,17 @@ swfdec_action_strict_equals (SwfdecAsContext *cx, guint action, const guint8 *da cond = SWFDEC_AS_VALUE_GET_STRING (rval) == SWFDEC_AS_VALUE_GET_STRING (lval); break; case SWFDEC_AS_TYPE_OBJECT: - cond = SWFDEC_AS_VALUE_GET_OBJECT (rval) == SWFDEC_AS_VALUE_GET_OBJECT (lval); + { + SwfdecAsObject *lo = SWFDEC_AS_VALUE_GET_OBJECT (lval); + SwfdecAsObject *ro = SWFDEC_AS_VALUE_GET_OBJECT (rval); + if (SWFDEC_IS_MOVIE (lo) && SWFDEC_IS_MOVIE (ro)) { + cond = swfdec_movie_res...
2007 Aug 22
0
163 commits - autogen.sh configure.ac doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_player.h libswfdec-gtk/swfdec_gtk_widget.c libswfdec-gtk/swfdec_source.c libswfdec/Makefile.am libswfdec/swfdec_as_array.c
...se SWFDEC_AS_TYPE_NUMBER: + case SWFDEC_AS_TYPE_NULL: + *dest = *src; + break; + case SWFDEC_AS_TYPE_STRING: + SWFDEC_AS_VALUE_SET_STRING (dest, + swfdec_as_context_get_string (SWFDEC_AS_CONTEXT (app), + SWFDEC_AS_VALUE_GET_STRING (src))); + break; + case SWFDEC_AS_TYPE_OBJECT: + SWFDEC_AS_VALUE_SET_OBJECT (dest, + vivi_wrap_object (app, SWFDEC_AS_VALUE_GET_OBJECT (src))); + break; + default: + g_assert_not_reached (); + break; + } +} + diff-tree 2f123ef946932f1b5e684b90fd27a056c0ea98f6 (from 3cd1dcc154eab81a8ff46e0ae56a24b1487fe802) Au...
2007 Aug 20
0
Branch 'vivi' - 60 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c
...se SWFDEC_AS_TYPE_NUMBER: + case SWFDEC_AS_TYPE_NULL: + *dest = *src; + break; + case SWFDEC_AS_TYPE_STRING: + SWFDEC_AS_VALUE_SET_STRING (dest, + swfdec_as_context_get_string (SWFDEC_AS_CONTEXT (app), + SWFDEC_AS_VALUE_GET_STRING (src))); + break; + case SWFDEC_AS_TYPE_OBJECT: + SWFDEC_AS_VALUE_SET_OBJECT (dest, + vivi_wrap_object (app, SWFDEC_AS_VALUE_GET_OBJECT (src))); + break; + default: + g_assert_not_reached (); + break; + } +} + diff-tree da9fc3e76d3757cb3a8a4459802c753adbbbcbe7 (from 589ed7ba10280a39d4ce2ce5c15863120511b600) Au...