Displaying 20 results from an estimated 37 matches for "swfdec_as_str_prototyp".
Did you mean:
swfdec_as_str_prototype
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
...-194,11 +195,13 @@ swfdec_as_function_init_context (SwfdecA
return;
context->Function_prototype = proto;
SWFDEC_AS_VALUE_SET_OBJECT (&val, proto);
- swfdec_as_object_set_variable (function, SWFDEC_AS_STR___proto__, &val);
- swfdec_as_object_set_variable (function, SWFDEC_AS_STR_prototype, &val);
+ swfdec_as_object_set_variable_and_flags (function, SWFDEC_AS_STR___proto__,
+ &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
+ swfdec_as_object_set_variable_and_flags (function, SWFDEC_AS_STR_prototype,
+ &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VAR...
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
...5eea43f..dddd4ce 100644
--- a/libswfdec/swfdec_sprite_movie_as.c
+++ b/libswfdec/swfdec_sprite_movie_as.c
@@ -477,7 +477,9 @@ swfdec_sprite_movie_init_context (Swfdec
if (!proto)
return;
SWFDEC_AS_VALUE_SET_OBJECT (&val, proto);
- swfdec_as_object_set_variable (player->MovieClip, SWFDEC_AS_STR_prototype, &val);
+ swfdec_as_object_set_variable_and_flags (player->MovieClip,
+ SWFDEC_AS_STR_prototype, &val, SWFDEC_AS_VARIABLE_HIDDEN |
+ SWFDEC_AS_VARIABLE_PERMANENT);
/* now add all the functions */
swfdec_as_object_add_function (proto, SWFDEC_AS_STR_attachMovie, SWFDEC_TY...
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
...deo == NULL)
return;
+ player->Video = video;
proto = swfdec_as_object_new (context);
- /* set the right properties on the NetStream object */
+ /* set the right properties on the Video 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 */
+ /* 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_fu...
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
...lean scripted)
{
SwfdecAsValue val;
SwfdecAsObject *proto;
@@ -950,7 +951,8 @@ swfdec_as_object_set_constructor (Swfdec
g_return_if_fail (SWFDEC_IS_AS_OBJECT (object));
g_return_if_fail (SWFDEC_IS_AS_OBJECT (construct));
- swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (construct), SWFDEC_AS_STR_prototype, &val);
+ swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (construct),
+ SWFDEC_AS_STR_prototype, &val);
if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) {
proto = SWFDEC_AS_VALUE_GET_OBJECT (&val);
} else {
@@ -959,8 +961,15 @@ swfdec_as_object_set_constructor (Swfdec
}...
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
...bswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index f0d27ce..70f5f78 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -1675,7 +1675,7 @@ swfdec_action_extends (SwfdecAsContext *
swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (super),
SWFDEC_AS_STR_prototype, &proto);
swfdec_as_object_set_variable (prototype, SWFDEC_AS_STR___proto__, &proto);
- swfdec_as_object_set_variable (prototype, SWFDEC_AS_STR_constructor,
+ swfdec_as_object_set_variable (prototype, SWFDEC_AS_STR___constructor__,
superclass);
SWFDEC_AS_VALUE_SET_OBJECT (&a...
2007 Oct 25
0
6 commits - libswfdec/swfdec_as_interpret.c test/trace
...wfdecAsObject *class, *prototype;
+
+ g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), FALSE);
+ g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (constructor), FALSE);
+
+ // FIXME: propflag tests are wrong, and we shouldn't get __proto__.prototype
+ swfdec_as_object_get_variable (constructor, SWFDEC_AS_STR_prototype, &val);
+ if (!SWFDEC_AS_VALUE_IS_OBJECT (&val))
+ return FALSE;
+ prototype = SWFDEC_AS_VALUE_GET_OBJECT (&val);
+
+ class = object;
+ while ((class = swfdec_as_object_get_prototype (class)) != NULL) {
+ if (class == prototype)
+ return TRUE;
+ }
+
+ return FALSE;
+}...
2007 Oct 26
0
2 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.h test/trace
...decAsValue *val, *argv;
+ SwfdecAsObject *object, *proto, *interface;
+ int argc, i;
+
+ swfdec_as_stack_ensure_size (cx, 2);
+
+ val = swfdec_as_stack_pop (cx);
+ if (SWFDEC_AS_VALUE_IS_OBJECT (val)) {
+ object = SWFDEC_AS_VALUE_GET_OBJECT (val);
+ swfdec_as_object_get_variable (object, SWFDEC_AS_STR_prototype, val);
+ if (SWFDEC_AS_VALUE_IS_OBJECT (val)) {
+ proto = SWFDEC_AS_VALUE_GET_OBJECT (val);
+ } else {
+ proto = NULL;
+ }
+ } else {
+ object = NULL;
+ proto = NULL;
+ }
+
+ val = swfdec_as_stack_pop (cx);
+ argc = swfdec_as_value_to_integer (cx, val);
+
+ if (argc &...
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
..._function (context->global,
+ SWFDEC_AS_STR_Video, 0, NULL, 0));
+ if (video == NULL)
+ return;
+ proto = swfdec_as_object_new (context);
+ /* set the right properties on the NetStream 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_MOVI...
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
...ntext);
- 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;
-}
-
-SwfdecAsFunction *
-swfdec_as_function_new_native (SwfdecAsContext *context, const char *name,
- SwfdecAsNative native, guint min_args)
-{
- SwfdecAsFunction *fun;
-
- g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL);
-...
2007 Nov 01
0
libswfdec/swfdec_as_interpret.c
...@@ -2321,7 +2321,7 @@ swfdec_action_extends (SwfdecAsContext *cx, guint action, const guint8 *data, gu
super = SWFDEC_AS_VALUE_GET_OBJECT (superclass);
prototype = swfdec_as_object_new_empty (cx);
if (prototype == NULL)
- return;
+ goto fail;
swfdec_as_object_get_variable (super, SWFDEC_AS_STR_prototype, &proto);
swfdec_as_object_set_variable (prototype, SWFDEC_AS_STR___proto__, &proto);
if (cx->version > 5) {
2007 Sep 13
0
libswfdec/swfdec_as_function.c
...context->Function_prototype = proto;
SWFDEC_AS_VALUE_SET_OBJECT (&val, proto);
+ swfdec_as_object_set_variable_and_flags (function, SWFDEC_AS_STR___proto__,
+ &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
swfdec_as_object_set_variable_and_flags (function, SWFDEC_AS_STR_prototype,
&val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
SWFDEC_AS_VALUE_SET_OBJECT (&val, function);
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
...ntext);
+ 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)
Author: Benjamin Otte <otte at gnome.org>
Date: Thu May 17 19:29:06 2007 +0200
change swfdec_as_frame_find_variable() return value...
2007 Aug 31
0
4 commits - libswfdec/swfdec_as_number.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_player_as.c test/trace
...ec_as_value_to_integer (cx, &argv[0]);
+ y = swfdec_as_value_to_integer (cx, &argv[1]);
+
+ func = swfdec_get_asnative (cx, x, y);
+ if (func) {
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, swfdec_as_object_new (cx));
+ 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 (rval, SWFDEC_AS_OBJECT (func));
+ } else {
+ SWFDEC_FIXME ("ASconstructor for %u %u missing", x, y);
+ }
+}
+
static void
swfdec_player_ASnative (SwfdecAsContext *cx, SwfdecA...
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
...+ swfdec_as_native_function_set_object_type (SWFDEC_AS_NATIVE_FUNCTION (boolean), SWFDEC_TYPE_AS_BOOLEAN);
+ proto = swfdec_as_object_new (context);
+ /* set the right properties on the Boolean object */
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, proto);
+ swfdec_as_object_set_variable (boolean, SWFDEC_AS_STR_prototype, &val);
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Function);
+ swfdec_as_object_set_variable (boolean, SWFDEC_AS_STR_constructor, &val);
+ /* set the right properties on the Boolean.prototype object */
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Object_prototype);
+...
2007 Sep 08
0
9 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_video_movie_as.c
...f --git a/libswfdec/swfdec_video_movie_as.c b/libswfdec/swfdec_video_movie_as.c
index 2edf5b4..8ae6656 100644
--- a/libswfdec/swfdec_video_movie_as.c
+++ b/libswfdec/swfdec_video_movie_as.c
@@ -74,7 +74,7 @@ swfdec_video_movie_init_context (SwfdecP
swfdec_as_object_set_variable_and_flags (video, SWFDEC_AS_STR_prototype, &val,
SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
/* set the right properties on the Video.prototype object */
- if (context->version >= 6) {
+ if (version >= 6) {
swfdec_as_object_add_function (proto, SWFDEC_AS_STR_attachVideo,
SWFDEC_TYPE_VIDEO_MOV...
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
...ct, 0));
+ if (!function)
+ return;
+ proto = swfdec_as_object_new (context);
+ if (!proto)
+ return;
+ swfdec_as_object_root (proto);
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, proto);
+ swfdec_as_object_set (function, SWFDEC_AS_STR___proto__, &val);
+ swfdec_as_object_set (function, SWFDEC_AS_STR_prototype, &val);
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, function);
+ swfdec_as_object_set (function, SWFDEC_AS_STR_constructor, &val);
+ swfdec_as_object_unroot (proto);
+}
diff --git a/libswfdec/swfdec_as_function.h b/libswfdec/swfdec_as_function.h
index 3f0cadc..260eb1f 100644
--- a/libswfdec...
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
.../* set prototype */
proto = swfdec_as_object_new (SWFDEC_AS_OBJECT (scope)->context);
if (proto == NULL)
return NULL;
@@ -136,6 +143,6 @@ swfdec_as_script_function_new (SwfdecAsS
SWFDEC_AS_VALUE_SET_OBJECT (&val, proto);
swfdec_as_object_set_variable (SWFDEC_AS_OBJECT (fun), SWFDEC_AS_STR_prototype, &val);
- return fun;
+ return SWFDEC_AS_FUNCTION (fun);
}
diff-tree 3589dfbffcdca650ce957c86ccbe0ce96078a24c (from 7f63d1408763835caedad52650757c8482ec0c46)
Author: Benjamin Otte <otte at gnome.org>
Date: Fri Aug 17 19:03:23 2007 +0200
require passing the script to swfdec_...
2007 Sep 04
0
4 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_video_movie_as.c test/trace
...--git a/libswfdec/swfdec_video_movie_as.c b/libswfdec/swfdec_video_movie_as.c
index bde3a24..2edf5b4 100644
--- a/libswfdec/swfdec_video_movie_as.c
+++ b/libswfdec/swfdec_video_movie_as.c
@@ -74,10 +74,12 @@ swfdec_video_movie_init_context (SwfdecP
swfdec_as_object_set_variable_and_flags (video, SWFDEC_AS_STR_prototype, &val,
SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
/* set the right properties on the Video.prototype object */
- swfdec_as_object_add_function (proto, SWFDEC_AS_STR_attachVideo, SWFDEC_TYPE_VIDEO_MOVIE,
- swfdec_video_attach_video, 1);
- swfdec_as_object_add_fu...
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
...SWFDEC_AS_STR_Array, 0, SWFDEC_TYPE_AS_ARRAY, swfdec_as_array_construct,
+ 0, proto));
+ if (!array)
+ return;
+ context->Array = array;
/* set the right properties on the Array object */
- SWFDEC_AS_VALUE_SET_OBJECT (&val, proto);
- swfdec_as_object_set_variable (array, SWFDEC_AS_STR_prototype, &val);
SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Function);
swfdec_as_object_set_variable (array, SWFDEC_AS_STR_constructor, &val);
SWFDEC_AS_VALUE_SET_NUMBER (&val, ARRAY_SORT_OPTION_CASEINSENSITIVE);
@@ -1106,9 +1103,6 @@ swfdec_as_array_init_context (SwfdecAsCo...
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
...swfdec_as_object_set_constructor (new, SWFDEC_AS_OBJECT (fun));
+ if (swfdec_as_context_use_mem (context, size)) {
+ new = g_object_new (type, NULL);
+ swfdec_as_object_add (new, context, size);
+ /* set initial variables */
+ if (swfdec_as_object_get_variable (SWFDEC_AS_OBJECT (fun), SWFDEC_AS_STR_prototype, &val)) {
+ swfdec_as_object_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_objec...