[Swfdec] 2 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c
Benjamin Otte
company at kemper.freedesktop.org
Fri Aug 17 14:37:59 PDT 2007
libswfdec/swfdec_as_context.c | 2 --
libswfdec/swfdec_as_interpret.c | 17 ++++++++++-------
2 files changed, 10 insertions(+), 9 deletions(-)
New commits:
diff-tree 616cfc32ab9acfa67d4d3c9c963ae76d29ac5835 (from b1ceea248f70bb55ebc8b0874491ef9b84bed2ba)
Author: Benjamin Otte <otte at gnome.org>
Date: Fri Aug 17 23:30:59 2007 +0200
ActionDelete and ActionDelete2 push TRUE or FALSE back to the success
diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index f9a2cc2..3b7c01f 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -1709,22 +1709,25 @@ swfdec_action_delete (SwfdecAsContext *c
{
SwfdecAsValue *val;
const char *name;
+ gboolean success = FALSE;
name = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 1));
val = swfdec_as_stack_peek (cx, 2);
if (SWFDEC_AS_VALUE_IS_OBJECT (val))
- swfdec_as_object_delete_variable (SWFDEC_AS_VALUE_GET_OBJECT (val), name);
- swfdec_as_stack_pop_n (cx, 2);
+ success = swfdec_as_object_delete_variable (SWFDEC_AS_VALUE_GET_OBJECT (val), name);
+ SWFDEC_AS_VALUE_SET_BOOLEAN (val, success);
+ swfdec_as_stack_pop_n (cx, 1);
}
static void
swfdec_action_delete2 (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
{
+ SwfdecAsValue *val;
const char *name;
- name = swfdec_as_value_to_string (cx, swfdec_as_stack_peek (cx, 1));
- swfdec_as_frame_delete_variable (cx->frame, name);
- swfdec_as_stack_pop (cx);
+ val = swfdec_as_stack_peek (cx, 1);
+ name = swfdec_as_value_to_string (cx, val);
+ SWFDEC_AS_VALUE_SET_BOOLEAN (val, swfdec_as_frame_delete_variable (cx->frame, name));
}
static void
@@ -2487,8 +2490,8 @@ const SwfdecActionSpec swfdec_as_actions
[SWFDEC_AS_ACTION_MB_CHAR_TO_ASCII] = { "MBCharToAscii", NULL },
[SWFDEC_AS_ACTION_MB_ASCII_TO_CHAR] = { "MBAsciiToChar", NULL, 1, 1, { NULL, swfdec_action_mb_ascii_to_char_5, swfdec_action_mb_ascii_to_char_5, swfdec_action_ascii_to_char, swfdec_action_ascii_to_char } },
/* version 5 */
- [SWFDEC_AS_ACTION_DELETE] = { "Delete", NULL, 2, 0, { NULL, NULL, swfdec_action_delete, swfdec_action_delete, swfdec_action_delete } },
- [SWFDEC_AS_ACTION_DELETE2] = { "Delete2", NULL, 1, 0, { NULL, NULL, swfdec_action_delete2, swfdec_action_delete2, swfdec_action_delete2 } },
+ [SWFDEC_AS_ACTION_DELETE] = { "Delete", NULL, 2, 1, { NULL, NULL, swfdec_action_delete, swfdec_action_delete, swfdec_action_delete } },
+ [SWFDEC_AS_ACTION_DELETE2] = { "Delete2", NULL, 1, 1, { NULL, NULL, swfdec_action_delete2, swfdec_action_delete2, swfdec_action_delete2 } },
[SWFDEC_AS_ACTION_DEFINE_LOCAL] = { "DefineLocal", NULL, 2, 0, { NULL, NULL, swfdec_action_define_local, swfdec_action_define_local, swfdec_action_define_local } },
[SWFDEC_AS_ACTION_CALL_FUNCTION] = { "CallFunction", NULL, -1, 1, { NULL, NULL, swfdec_action_call_function, swfdec_action_call_function, swfdec_action_call_function } },
[SWFDEC_AS_ACTION_RETURN] = { "Return", NULL, 1, 0, { NULL, NULL, swfdec_action_return, swfdec_action_return, swfdec_action_return } },
diff-tree b1ceea248f70bb55ebc8b0874491ef9b84bed2ba (from 8ea0acbb24b2faaa135c7ca793483b818c5621b9)
Author: Benjamin Otte <otte at gnome.org>
Date: Fri Aug 17 23:30:34 2007 +0200
unused variable
diff --git a/libswfdec/swfdec_as_context.c b/libswfdec/swfdec_as_context.c
index d0017d0..75ab9d6 100644
--- a/libswfdec/swfdec_as_context.c
+++ b/libswfdec/swfdec_as_context.c
@@ -1007,8 +1007,6 @@ static void
swfdec_as_context_ASSetPropFlags_set_one_flag (SwfdecAsObject *object,
const char *s, guint *flags)
{
- guint real;
-
swfdec_as_object_unset_variable_flags (object, s, flags[1]);
swfdec_as_object_set_variable_flags (object, s, flags[0]);
}
More information about the Swfdec
mailing list