Displaying 20 results from an estimated 44 matches for "swfdec_as_str_constructor".
2007 Aug 21
0
4 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_number.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_string.c libswfdec/swfdec_color_as.c test/trace
..._set_variable (proto, SWFDEC_AS_STR___proto__, &val);
+ swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR___proto__, &val,
+ SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
SWFDEC_AS_VALUE_SET_OBJECT (&val, array);
swfdec_as_object_set_variable (proto, SWFDEC_AS_STR_constructor, &val);
swfdec_as_object_add_function (proto, SWFDEC_AS_STR_toString, 0,
diff --git a/libswfdec/swfdec_as_boolean.c b/libswfdec/swfdec_as_boolean.c
index 907960a..18872cb 100644
--- a/libswfdec/swfdec_as_boolean.c
+++ b/libswfdec/swfdec_as_boolean.c
@@ -103,7 +103,8 @@ swfdec_as_boolean_init...
2007 Aug 22
0
5 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_math.c libswfdec/swfdec_as_number.c libswfdec/swfdec_as_script_function.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h
...- a/libswfdec/swfdec_as_boolean.c
+++ b/libswfdec/swfdec_as_boolean.c
@@ -99,7 +99,8 @@ swfdec_as_boolean_init_context (SwfdecAs
return;
/* set the right properties on the Boolean.prototype object */
SWFDEC_AS_VALUE_SET_OBJECT (&val, boolean);
- swfdec_as_object_set_variable (proto, SWFDEC_AS_STR_constructor, &val);
+ swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR_constructor,
+ &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
swfdec_as_object_add_function (proto, SWFDEC_AS_STR_toString, SWFDEC_TYPE_AS_BOOLEAN, swfdec_as_boolean_toString, 0);
swfdec_as...
2007 Aug 22
0
3 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_function.c test/trace
...set_length (object, 0);
}
SWFDEC_AS_VALUE_SET_OBJECT (ret, object);
@@ -1090,7 +1084,8 @@ swfdec_as_array_init_context (SwfdecAsCo
/* set the right properties on the Array object */
SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Function);
- swfdec_as_object_set_variable (array, SWFDEC_AS_STR_constructor, &val);
+ swfdec_as_object_set_variable_and_flags (array, SWFDEC_AS_STR_constructor,
+ &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
SWFDEC_AS_VALUE_SET_NUMBER (&val, ARRAY_SORT_OPTION_CASEINSENSITIVE);
swfdec_as_object_set_variable (array, SWFDEC_AS_STR_C...
2007 Sep 02
0
3 commits - libswfdec/swfdec_as_number.c libswfdec/swfdec_internal.h libswfdec/swfdec_player_as.c libswfdec/swfdec_player.c test/trace
...T (&val));
- object = SWFDEC_AS_VALUE_GET_OBJECT (&val);
- swfdec_as_object_unset_variable_flags (object, SWFDEC_AS_STR___proto__,
- SWFDEC_AS_VARIABLE_PERMANENT);
- swfdec_as_object_delete_variable (object, SWFDEC_AS_STR___proto__);
- swfdec_as_object_unset_variable_flags (object, SWFDEC_AS_STR_constructor,
- SWFDEC_AS_VARIABLE_PERMANENT);
- swfdec_as_object_delete_variable (object, SWFDEC_AS_STR_constructor);
-
- swfdec_as_object_get_variable (context->global, SWFDEC_AS_STR_ASconstructor,
- &val);
- g_assert (SWFDEC_AS_VALUE_IS_OBJECT (&val));
- object = SWFDEC_AS_VALUE_GET_...
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
...ting it later on is easier than duplicating swfdec_as_object_add_function() */
+ swfdec_as_object_delete_variable (context->global, SWFDEC_AS_STR_Function);
+ }
context->Function = function;
SWFDEC_AS_VALUE_SET_OBJECT (&val, function);
swfdec_as_object_set_variable (function, SWFDEC_AS_STR_constructor, &val);
diff-tree cb168347a7ab95b8918e3d4d737e37bd693fda10 (from 12a24b52a62b851c41bc2393312ff5a5f18dc2df)
Author: Benjamin Otte <otte at gnome.org>
Date: Thu May 24 17:11:28 2007 +0200
cosmetic fix
diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c
index 1cd...
2007 Aug 31
0
4 commits - libswfdec/swfdec_as_number.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_player_as.c test/trace
...T (&val));
+ object = SWFDEC_AS_VALUE_GET_OBJECT (&val);
+ swfdec_as_object_unset_variable_flags (object, SWFDEC_AS_STR___proto__,
+ SWFDEC_AS_VARIABLE_PERMANENT);
+ swfdec_as_object_delete_variable (object, SWFDEC_AS_STR___proto__);
+ swfdec_as_object_unset_variable_flags (object, SWFDEC_AS_STR_constructor,
+ SWFDEC_AS_VARIABLE_PERMANENT);
+ swfdec_as_object_delete_variable (object, SWFDEC_AS_STR_constructor);
+
+ swfdec_as_object_get_variable (context->global, SWFDEC_AS_STR_ASconstructor,
+ &val);
+ g_assert (SWFDEC_AS_VALUE_IS_OBJECT (&val));
+ object = SWFDEC_AS_VALUE_GET_...
2007 Aug 17
0
4 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h test/trace
..._variable (object, SWFDEC_AS_STR___proto__, &val);
+ swfdec_as_object_set_variable_flags (object, SWFDEC_AS_STR___proto__,
+ SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
SWFDEC_AS_VALUE_SET_OBJECT (&val, construct);
- swfdec_as_object_set_variable (object, scripted ? SWFDEC_AS_STR_constructor : SWFDEC_AS_STR___constructor__, &val);
+ swfdec_as_object_set_variable (object,
+ scripted ? SWFDEC_AS_STR_constructor : SWFDEC_AS_STR___constructor__,
+ &val);
+ swfdec_as_object_set_variable_flags (object,
+ scripted ? SWFDEC_AS_STR_constructor : SWFDEC_AS_STR___construc...
2007 Aug 22
0
5 commits - libswfdec/swfdec_as_object.c NEWS player/swfplay.c
..., context->Object_prototype);
- swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR___proto__,
- &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Object);
swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR_constructor,
&val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Object_prototype);
+ swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR___proto__,
+ &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT...
2007 Jun 27
0
Branch 'as' - 3 commits - libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_js_video.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_video_movie_as.c libswfdec/swfdec_video_movie.c
...swfdec_as_object_set_variable (video, SWFDEC_AS_STR_prototype, &val);
- /* set the right properties on the NetStream.prototype object */
+ /* set the right properties on the Video.prototype object */
SWFDEC_AS_VALUE_SET_OBJECT (&val, video);
swfdec_as_object_set_variable (proto, SWFDEC_AS_STR_constructor, &val);
- swfdec_as_object_add_function (proto, SWFDEC_AS_STR_attachMovie, SWFDEC_TYPE_VIDEO_MOVIE,
+ swfdec_as_object_add_function (proto, SWFDEC_AS_STR_attachVideo, SWFDEC_TYPE_VIDEO_MOVIE,
swfdec_video_attach_video, 1);
swfdec_as_object_add_function (proto, SWFDEC_AS_STR_clear, S...
2007 Aug 19
0
2 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_super.c libswfdec/swfdec_as_with.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_sprite_movie.c
...0,8 @@ swfdec_as_object_set_constructor (Swfdec
swfdec_as_object_set_variable_flags (object, SWFDEC_AS_STR___proto__,
SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
SWFDEC_AS_VALUE_SET_OBJECT (&val, construct);
- swfdec_as_object_set_variable (object,
- scripted ? SWFDEC_AS_STR_constructor : SWFDEC_AS_STR___constructor__,
- &val);
- swfdec_as_object_set_variable_flags (object,
- scripted ? SWFDEC_AS_STR_constructor : SWFDEC_AS_STR___constructor__,
- SWFDEC_AS_VARIABLE_HIDDEN);
+ swfdec_as_object_set_variable (object, SWFDEC_AS_STR___constructor__, &val);
+ s...
2007 May 18
0
Branch 'as' - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_native_function.h
...sizeof (SwfdecAsFunction));
- swfdec_as_object_root (fun);
+ fun = g_object_new (type, NULL);
+ swfdec_as_object_add (SWFDEC_AS_OBJECT (fun), context, size);
if (context->Function) {
SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Function);
swfdec_as_object_set_variable (fun, SWFDEC_AS_STR_constructor, &val);
@@ -92,60 +61,17 @@ swfdec_as_function_do_create (SwfdecAsCo
SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Function_prototype);
swfdec_as_object_set_variable (fun, SWFDEC_AS_STR___proto__, &val);
}
- swfdec_as_object_unroot (fun);
return SWFDEC_AS_FUNCTION (fu...
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
...val;
- super->object = frame->thisp;
- swfdec_as_object_get_variable (frame->thisp, SWFDEC_AS_STR___proto__, &val);
- if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) {
- SwfdecAsObject *proto = SWFDEC_AS_VALUE_GET_OBJECT (&val);
- swfdec_as_object_get_variable (proto, SWFDEC_AS_STR_constructor, &val);
- if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) {
- super->constructor = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (&val);
- if (!SWFDEC_IS_AS_FUNCTION (super->constructor))
- super->constructor = NULL;
- }
- }
- }
swfdec_as_object_add (ret, context, si...
2007 Jun 27
0
Branch 'as' - 16 commits - configure.ac libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_script_function.c
...tream object */
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, proto);
+ swfdec_as_object_set_variable (video, SWFDEC_AS_STR_prototype, &val);
+ /* set the right properties on the NetStream.prototype object */
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, video);
+ swfdec_as_object_set_variable (proto, SWFDEC_AS_STR_constructor, &val);
+ swfdec_as_object_add_function (proto, SWFDEC_AS_STR_attachMovie, SWFDEC_TYPE_VIDEO_MOVIE,
+ swfdec_video_attach_video, 1);
+ swfdec_as_object_add_function (proto, SWFDEC_AS_STR_clear, SWFDEC_TYPE_VIDEO_MOVIE,
+ swfdec_video_clear, 0);
}
diff-tree cbf5b3fcecd54d80669ffe7...
2007 Jun 28
0
Branch 'as' - 3 commits - libswfdec/swfdec_as_string.c libswfdec/swfdec_as_strings.c test/trace
...+
+static void
swfdec_as_string_charAt (SwfdecAsContext *cx, SwfdecAsObject *object,
guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
{
@@ -671,6 +695,7 @@ swfdec_as_string_init_context (SwfdecAsC
SWFDEC_AS_VALUE_SET_OBJECT (&val, string);
swfdec_as_object_set_variable (proto, SWFDEC_AS_STR_constructor, &val);
swfdec_as_object_add_function (proto, SWFDEC_AS_STR_charAt, SWFDEC_TYPE_AS_STRING, swfdec_as_string_charAt, 1);
+ swfdec_as_object_add_function (proto, SWFDEC_AS_STR_indexOf, SWFDEC_TYPE_AS_STRING, swfdec_as_string_indexOf, 1);
swfdec_as_object_add_function (proto, SWFDEC_AS_STR_...
2007 May 17
0
Branch 'as' - 8 commits - libswfdec/.gitignore libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_object.h libswfdec/swfdec_movie.c libswfdec/swfdec_sprite_movie_as.c
...te (SWFDEC_AS_OBJECT (scope)->context);
if (fun == NULL)
return NULL;
+ proto = swfdec_as_object_new (SWFDEC_AS_OBJECT (scope)->context);
+ if (proto == NULL)
+ return NULL;
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (fun));
+ swfdec_as_object_set_variable (proto, SWFDEC_AS_STR_constructor, &val);
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, proto);
+ swfdec_as_object_set_variable (SWFDEC_AS_OBJECT (fun), SWFDEC_AS_STR_prototype, &val);
fun->scope = scope;
return fun;
diff-tree ab019a8f3710c9d4304beb07bff3788ad9935e60 (from 551a69d50afe92c6e2736a95280e6e96fd5044e2)
Au...
2007 Jun 21
0
Branch 'as' - 5 commits - libswfdec/Makefile.am libswfdec/swfdec_as_strings.c libswfdec/swfdec_js_net_stream.c libswfdec/swfdec_movie.c libswfdec/swfdec_net_connection.c libswfdec/swfdec_net_stream_as.c libswfdec/swfdec_net_stream.c
...eam object */
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, proto);
+ swfdec_as_object_set_variable (stream, SWFDEC_AS_STR_prototype, &val);
+ /* set the right properties on the NetStream.prototype object */
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, stream);
+ swfdec_as_object_set_variable (proto, SWFDEC_AS_STR_constructor, &val);
+ swfdec_as_object_add_function (proto, SWFDEC_AS_STR_pause, SWFDEC_TYPE_NET_STREAM,
+ swfdec_net_stream_pause, 0);
+ swfdec_as_object_add_function (proto, SWFDEC_AS_STR_play, SWFDEC_TYPE_NET_STREAM,
+ swfdec_net_stream_play, 1);
+ swfdec_as_object_add_function (proto, SWFD...
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
...ect_set_variable_and_flags (new, SWFDEC_AS_STR___proto__,
+ &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
+ }
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, SWFDEC_AS_OBJECT (fun));
+ if (context->version < 7) {
+ swfdec_as_object_set_variable_and_flags (new, SWFDEC_AS_STR_constructor,
+ &val, SWFDEC_AS_VARIABLE_HIDDEN);
+ }
+ if (context->version <= 5)
+ SWFDEC_AS_VALUE_SET_UNDEFINED (&val);
+ swfdec_as_object_set_variable_and_flags (new, SWFDEC_AS_STR___constructor__,
+ &val, SWFDEC_AS_VARIABLE_HIDDEN);
+ } else {
+ /* need to do this, s...
2007 May 23
0
Branch 'as' - 7 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_strings.c
...ex e5b9728..ffbc0b5 100644
--- a/libswfdec/swfdec_as_super.c
+++ b/libswfdec/swfdec_as_super.c
@@ -79,10 +79,10 @@ swfdec_as_super_new (SwfdecAsFrame *fram
if (frame->thisp) {
SwfdecAsValue val;
super->object = frame->thisp;
- swfdec_as_object_get_variable (frame->thisp, SWFDEC_AS_STR_constructor, &val);
+ swfdec_as_object_get_variable (frame->thisp, SWFDEC_AS_STR___proto__, &val);
if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) {
- SwfdecAsObject *constructor = SWFDEC_AS_VALUE_GET_OBJECT (&val);
- swfdec_as_object_get_variable (constructor, SWFDEC_AS_STR___constr...
2007 Aug 17
0
Branch 'vivi' - 9 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_native_function.c
...SWFDEC_AS_OBJECT (fun), context, size);
+ g_return_if_fail (SWFDEC_IS_AS_FUNCTION (fun));
+
+ object = SWFDEC_AS_OBJECT (fun);
+ context = object->context;
if (context->Function) {
SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Function);
- swfdec_as_object_set_variable (fun, SWFDEC_AS_STR_constructor, &val);
+ swfdec_as_object_set_variable (object, SWFDEC_AS_STR_constructor, &val);
}
if (context->Function_prototype) {
SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Function_prototype);
- swfdec_as_object_set_variable (fun, SWFDEC_AS_STR___proto__, &val);
+ s...
2007 Sep 03
0
20 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_number.c
...<= 5
diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c
index 579d315..4472615 100644
--- a/libswfdec/swfdec_as_object.c
+++ b/libswfdec/swfdec_as_object.c
@@ -1011,10 +1011,10 @@ swfdec_as_object_create (SwfdecAsFunctio
swfdec_as_object_set_variable_and_flags (new, SWFDEC_AS_STR_constructor,
&val, SWFDEC_AS_VARIABLE_HIDDEN);
}
- if (context->version <= 5)
- SWFDEC_AS_VALUE_SET_UNDEFINED (&val);
- swfdec_as_object_set_variable_and_flags (new, SWFDEC_AS_STR___constructor__,
- &val, SWFDEC_AS_VARIABLE_HIDDEN);
+ if (context->version > 5) {...