[Swfdec] libswfdec/swfdec_player_as.c
Pekka Lampila
medar at kemper.freedesktop.org
Fri Aug 31 14:24:20 PDT 2007
libswfdec/swfdec_player_as.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
diff-tree 7a06bd440379a8307047894e2b476ca6e354556e (from 4305a7503846739da9ce1db2a9c9e83ff45e10ba)
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date: Sat Sep 1 00:22:30 2007 +0300
Forgot to set prototype.constructor in ASconstructor
diff --git a/libswfdec/swfdec_player_as.c b/libswfdec/swfdec_player_as.c
index ee21aa0..a492055 100644
--- a/libswfdec/swfdec_player_as.c
+++ b/libswfdec/swfdec_player_as.c
@@ -122,6 +122,7 @@ swfdec_player_ASconstructor (SwfdecAsCon
guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval)
{
SwfdecAsValue val;
+ SwfdecAsObject *proto;
SwfdecAsFunction *func;
guint x, y;
@@ -130,11 +131,17 @@ swfdec_player_ASconstructor (SwfdecAsCon
func = swfdec_get_asnative (cx, x, y);
if (func) {
- SWFDEC_AS_VALUE_SET_OBJECT (&val, swfdec_as_object_new (cx));
+ proto = swfdec_as_object_new (cx);
+
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, proto);
swfdec_as_object_set_variable_and_flags (SWFDEC_AS_OBJECT (func),
SWFDEC_AS_STR_prototype, &val,
SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (func));
+ swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR_constructor,
+ &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
+
SWFDEC_AS_VALUE_SET_OBJECT (rval, SWFDEC_AS_OBJECT (func));
} else {
SWFDEC_FIXME ("ASconstructor for %u %u missing", x, y);
More information about the Swfdec
mailing list