Displaying 20 results from an estimated 44 matches for "swfdec_as_variable_perman".
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
...the Array.prototype object */
SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Object_prototype);
- swfdec_as_object_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...
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
...ngth (SwfdecAsObje
g_return_if_fail (object != NULL);
SWFDEC_AS_VALUE_SET_INT (&val, length);
- swfdec_as_object_set_variable (object, SWFDEC_AS_STR_length, &val);
+ swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR_length, &val,
+ SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
}
typedef struct {
diff --git a/libswfdec/swfdec_as_boolean.c b/libswfdec/swfdec_as_boolean.c
index b883868..c241de8 100644
--- 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 pr...
2007 Aug 22
0
5 commits - libswfdec/swfdec_as_object.c NEWS player/swfplay.c
...text *c
g_assert (context->Object_prototype);
object = swfdec_as_object_new_empty (context);
- 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);
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);
+ sw...
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
...ative and ASconstructor
-
- swfdec_as_object_get_variable (context->global, SWFDEC_AS_STR_ASnative, &val);
- g_assert (SWFDEC_AS_VALUE_IS_OBJECT (&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...
2007 Aug 17
1
libswfdec/swfdec_as_object.c
...fdec/swfdec_as_object.c
@@ -61,11 +61,11 @@
/**
* SwfdecAsVariableFlag:
- * @SWFDEC_AS_VARIABLE_DONT_ENUM: Do not include variable in enumerations and
+ * @SWFDEC_AS_VARIABLE_HIDDEN: Do not include variable in enumerations and
* swfdec_as_object_foreach().
* @SWFDEC_AS_VARIABLE_PERMANENT: Do not all swfdec_as_object_delete_variable()
* to delete this variable.
- * @SWFDEC_AS_VARIABLE_READONLY: Do not allow changing the value with
+ * @SWFDEC_AS_VARIABLE_CONSTANT: Do not allow changing the value with
* swfdec_as_obj...
2007 Aug 31
0
4 commits - libswfdec/swfdec_as_number.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_player_as.c test/trace
...ative and ASconstructor
+
+ swfdec_as_object_get_variable (context->global, SWFDEC_AS_STR_ASnative, &val);
+ g_assert (SWFDEC_AS_VALUE_IS_OBJECT (&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...
2007 Oct 28
1
9 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_object.c libswfdec/swfdec_codec_gst.c test/trace
...as_object.c
index 2ae087b..a5f7866 100644
--- a/libswfdec/swfdec_as_object.c
+++ b/libswfdec/swfdec_as_object.c
@@ -67,7 +67,7 @@
* SwfdecAsVariableFlag:
* @SWFDEC_AS_VARIABLE_HIDDEN: Do not include variable in enumerations and
* swfdec_as_object_foreach().
- * @SWFDEC_AS_VARIABLE_PERMANENT: Do not all swfdec_as_object_delete_variable()
+ * @SWFDEC_AS_VARIABLE_PERMANENT: Do not alloe swfdec_as_object_delete_variable()
* to delete this variable.
* @SWFDEC_AS_VARIABLE_CONSTANT: Do not allow changing the value with
* s...
2007 Oct 28
0
2 commits - libswfdec/swfdec_as_object.c libswfdec/swfdec_player.c
...as_object.c
index cc6be1a..682cb2b 100644
--- a/libswfdec/swfdec_as_object.c
+++ b/libswfdec/swfdec_as_object.c
@@ -67,7 +67,7 @@
* SwfdecAsVariableFlag:
* @SWFDEC_AS_VARIABLE_HIDDEN: Do not include variable in enumerations and
* swfdec_as_object_foreach().
- * @SWFDEC_AS_VARIABLE_PERMANENT: Do not alloe swfdec_as_object_delete_variable()
+ * @SWFDEC_AS_VARIABLE_PERMANENT: Do not allow swfdec_as_object_delete_variable()
* to delete this variable.
* @SWFDEC_AS_VARIABLE_CONSTANT: Do not allow changing the value with
*...
2007 Sep 13
0
libswfdec/swfdec_as_function.c
...unction.c
@@ -244,6 +244,8 @@ swfdec_as_function_init_context (SwfdecA
return;
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 Aug 22
0
3 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_function.c test/trace
...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_CASEINSENSITIVE, &val);
SWFDEC_AS_VALUE_SET_NUMBER (&val, ARRAY_SORT_OPTION_DESCENDING);
@@ -1104,7 +1099,8 @@ swfdec_as_array_init_context (SwfdecAsCo...
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
...ctor (Swfd
object = SWFDEC_AS_OBJECT (fun);
context = object->context;
- if (context->Function) {
- SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Function);
- swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR_constructor,
- &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
- }
+ if (context->Function == NULL)
+ return;
+
+ SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Function);
+ swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR_constructor,
+ &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
+
if (context...
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
...-959,8 +961,15 @@ swfdec_as_object_set_constructor (Swfdec
}
SWFDEC_AS_VALUE_SET_OBJECT (&val, proto);
swfdec_as_object_set_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__,...
2007 Sep 13
0
3 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_object.c
.../swfdec_as_function.c
+++ b/libswfdec/swfdec_as_function.c
@@ -239,19 +239,17 @@ swfdec_as_function_init_context (SwfdecA
SWFDEC_AS_VALUE_SET_OBJECT (&val, function);
swfdec_as_object_set_variable_and_flags (function, SWFDEC_AS_STR_constructor,
&val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
- if (version > 5) {
- proto = swfdec_as_object_new_empty (context);
- if (!proto)
- return;
- context->Function_prototype = proto;
- SWFDEC_AS_VALUE_SET_OBJECT (&val, proto);
- swfdec_as_object_set_variable_and_flags (function, SWFDEC_AS_STR___proto__,
- &va...
2007 Sep 03
0
4 commits - libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_boolean.h libswfdec/swfdec_as_context.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_interpret.c test/trace
...oolean)
+ if (!SWFDEC_IS_AS_BOOLEAN (object))
return;
- /* set the right properties on the Boolean.prototype object */
- SWFDEC_AS_VALUE_SET_OBJECT (&val, boolean);
- 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_object_add_function (proto, SWFDEC_AS_STR_valueOf, SWFDEC_TYPE_AS_BOOLEAN, swfdec_as_boolean_valueOf, 0);
- SWFDEC_AS_VALUE_SET_OBJECT (&val, context->O...
2007 Jul 26
0
5 commits - doc/Makefile.am doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_player_as.c
...il (variable != NULL);
+ g_return_if_fail (SWFDEC_IS_AS_FUNCTION (get));
+ g_return_if_fail (set == NULL || SWFDEC_IS_AS_FUNCTION (set));
+
+ var = swfdec_as_object_lookup_variable (object, variable);
+ if (var == NULL)
+ return;
+ var->get = get;
+ var->set = set;
+ var->flags = SWFDEC_AS_VARIABLE_PERMANENT;
+ if (set == NULL)
+ var->flags |= SWFDEC_AS_VARIABLE_READONLY;
+}
+
/*** AS CODE ***/
static void
@@ -941,7 +976,6 @@ swfdec_as_object_addProperty (SwfdecAsCo
guint argc, SwfdecAsValue *argv, SwfdecAsValue *retval)
{
SwfdecAsFunction *get, *set;
- SwfdecAsVariable *var;...
2007 Aug 23
0
10 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_object.c test/trace
...object.c
@@ -1034,7 +1034,7 @@ swfdec_as_object_set_constructor (Swfdec
}
SWFDEC_AS_VALUE_SET_OBJECT (&val, construct);
swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR_constructor,
- &val, SWFDEC_AS_VARIABLE_HIDDEN);
+ &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
SWFDEC_AS_VALUE_SET_OBJECT (&val, proto);
swfdec_as_object_set_variable_and_flags (object, SWFDEC_AS_STR___proto__,
&val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
diff-tree c2794c164f2e92057da600f395e591fdf6eb06fa (from 10d4cc43986ce88bb43cb7bf96712846c9...
2007 Sep 04
0
4 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_video_movie_as.c test/trace
...ie_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_function (proto, SWFDEC_AS_STR_clear, SWFDEC_TYPE_VIDEO_MOVIE,
- swfde...
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
...(ret, swfdec_as_context_get_string (cx, s));
g_free (s);
}
@@ -748,21 +771,17 @@ swfdec_as_string_init_context (SwfdecAsC
SWFDEC_AS_VALUE_SET_OBJECT (&val, string);
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_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_lastInd...
2007 Sep 13
0
2 commits - libswfdec/swfdec_as_function.c test/trace
...o)
return;
- context->Function_prototype = proto;
+ if (version > 5)
+ 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_object_set_variable_and_flags (function, SWFDEC_AS_STR___proto__,
+ &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIA...
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
..._as_object_set_constructor (SwfdecAsObject *object, SwfdecAsObject *construct)
{
SwfdecAsValue val;
SwfdecAsObject *proto;
@@ -964,12 +960,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_...