Displaying 20 results from an estimated 22 matches for "swfdec_as_function_init_context".
2007 Jul 13
0
12 commits - AUTHORS doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_array.h libswfdec/swfdec_as_context.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h
...100644
--- a/libswfdec/swfdec_as_internal.h
+++ b/libswfdec/swfdec_as_internal.h
@@ -20,6 +20,7 @@
#ifndef _SWFDEC_AS_INTERNAL_H_
#define _SWFDEC_AS_INTERNAL_H_
+#include <libswfdec/swfdec_as_object.h>
#include <libswfdec/swfdec_as_types.h>
G_BEGIN_DECLS
@@ -37,6 +38,9 @@ void swfdec_as_function_init_context (S
guint version);
/* swfdec_as_object.c */
+typedef SwfdecAsVariableForeach SwfdecAsVariableForeachRemove;
+typedef const char *(* SwfdecAsVariableForeachRename) (SwfdecAsObject *object,
+ const char *variable, SwfdecAsValue *value, guint flags, gpointer data);
void swfdec_as_ob...
2007 Sep 13
0
libswfdec/swfdec_as_function.c
...2:18 2007 +0300
Managed to cause Function.__proto__ to not be added in my last commit, fixed
diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c
index c5b5694..b00f765 100644
--- a/libswfdec/swfdec_as_function.c
+++ b/libswfdec/swfdec_as_function.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_variab...
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
...44
--- a/libswfdec/swfdec_as_function.c
+++ b/libswfdec/swfdec_as_function.c
@@ -101,12 +101,6 @@ swfdec_as_function_call (SwfdecAsFunctio
/*** AS CODE ***/
-static void
-swfdec_as_function_construct (SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
-{
-
-}
-
void
swfdec_as_function_init_context (SwfdecAsContext *context, guint version)
{
@@ -116,9 +110,13 @@ swfdec_as_function_init_context (SwfdecA
g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context));
function = SWFDEC_AS_OBJECT (swfdec_as_object_add_function (context->global,
- SWFDEC_AS_STR_Function, 0, swfdec_as_function_...
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
...* functions and properties are available in the context.
+ **/
+void
+swfdec_as_context_startup (SwfdecAsContext *context, guint version)
+{
+ g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context));
+ g_return_if_fail (context->state == SWFDEC_AS_CONTEXT_NEW);
+
+ context->version = version;
+ swfdec_as_function_init_context (context, version);
+ context->state = SWFDEC_AS_CONTEXT_RUNNING;
+}
+
/*** EVAL ***/
char *
diff --git a/libswfdec/swfdec_as_context.h b/libswfdec/swfdec_as_context.h
index c811db4..31e6757 100644
--- a/libswfdec/swfdec_as_context.h
+++ b/libswfdec/swfdec_as_context.h
@@ -26,6 +26,7 @@
G_...
2007 Nov 14
0
7 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_super.c libswfdec/swfdec_as_super.h
...ternal.h
@@ -34,11 +34,16 @@ G_BEGIN_DECLS
SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret);
-void swfdec_as_function_set_constructor (SwfdecAsFunction * fun);
-void swfdec_as_function_set_security (SwfdecAsFunction * fun,
- SwfdecSecurity * sec);
-void swfdec_as_function_init_context (SwfdecAsContext * context,
- guint version);
+void swfdec_as_function_set_constructor (SwfdecAsFunction * fun);
+void swfdec_as_function_set_security (SwfdecAsFunction * fun,
+ SwfdecSecurity * sec);
+void swfdec_as_function_init_context (SwfdecAsContext * context,
+ g...
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
...rototype);
- swfdec_as_object_set_variable (fun, SWFDEC_AS_STR___proto__, &val);
+ swfdec_as_object_set_variable_and_flags (fun, SWFDEC_AS_STR___proto__,
+ &val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
}
return SWFDEC_AS_FUNCTION (fun);
@@ -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_...
2007 Oct 22
0
6 commits - doc/Makefile.am doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_player.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_internal.h libswfdec/swfdec_player.c libswfdec/swfdec_player.h
...check_continue) (SwfdecAsContext * context);
};
GType swfdec_as_context_get_type (void);
diff --git a/libswfdec/swfdec_as_internal.h b/libswfdec/swfdec_as_internal.h
index ee49ef2..98cb9ee 100644
--- a/libswfdec/swfdec_as_internal.h
+++ b/libswfdec/swfdec_as_internal.h
@@ -41,6 +41,7 @@ void swfdec_as_function_init_context (SwfdecAsContext * context,
guint version);
/* swfdec_as_context.c */
+gboolean swfdec_as_context_check_continue (SwfdecAsContext * context);
void swfdec_as_context_run_init_script (SwfdecAsContext * context,
const guint8 * data,
gsize length,
2007 Sep 11
0
8 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_strings.c test/trace
...ki.fi>
Date: Tue Sep 11 14:36:22 2007 +0300
Add Function.prototype.constructor property
diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c
index 27a0121..c8f4fbe 100644
--- a/libswfdec/swfdec_as_function.c
+++ b/libswfdec/swfdec_as_function.c
@@ -247,6 +247,9 @@ swfdec_as_function_init_context (SwfdecA
&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);
+ swfdec_a...
2007 Jul 13
0
4 commits - configure.ac libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_object.h libswfdec/swfdec_scriptable.c libswfdec/swfdec_scriptable.h NEWS
...ect_run() from exported headers
SwfdecScript is not exported, so it cannot be public
diff --git a/libswfdec/swfdec_as_internal.h b/libswfdec/swfdec_as_internal.h
index 00d56db..ca6ab2d 100644
--- a/libswfdec/swfdec_as_internal.h
+++ b/libswfdec/swfdec_as_internal.h
@@ -41,6 +41,7 @@ void swfdec_as_function_init_context (S
typedef SwfdecAsVariableForeach SwfdecAsVariableForeachRemove;
typedef const char *(* SwfdecAsVariableForeachRename) (SwfdecAsObject *object,
const char *variable, SwfdecAsValue *value, guint flags, gpointer data);
+
void swfdec_as_object_collect (SwfdecAsObject * object);
guint...
2007 May 29
0
Branch 'as' - 8 commits - libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_math.c libswfdec/swfdec_as_math.h libswfdec/swfdec_as_strings.c libswfdec/swfdec_as_types.c
...umber.h"
#include "swfdec_as_object.h"
@@ -797,13 +798,17 @@ swfdec_as_context_startup (SwfdecAsConte
g_return_if_fail (context->state == SWFDEC_AS_CONTEXT_NEW);
context->version = version;
+ /* get the necessary objects up to define objects and functions sanely */
swfdec_as_function_init_context (context, version);
swfdec_as_object_init_context (context, version);
-
+ /* define the global object and other important ones */
swfdec_as_context_init_global (context, version);
swfdec_as_array_init_context (context, version);
-
+ /* define the type objects */
swfdec_as_number_init_...
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
...to_object (context, &argv[0]);
+ argc -= 1;
+ argv++;
+ } else {
+ thisp = NULL;
+ }
+ if (thisp == NULL)
+ thisp = swfdec_as_object_new_empty (context);
+ swfdec_as_function_call (SWFDEC_AS_FUNCTION (fun), thisp, argc, argv, ret);
+ swfdec_as_context_run (context);
+}
+
void
swfdec_as_function_init_context (SwfdecAsContext *context, guint version)
{
@@ -126,6 +146,9 @@ swfdec_as_function_init_context (SwfdecA
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_...
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
...g_return_if_fail (context->frame == NULL);
if (swfdec_as_context_needs_gc (context))
diff --git a/libswfdec/swfdec_as_internal.h b/libswfdec/swfdec_as_internal.h
index 819a65d..bc3290a 100644
--- a/libswfdec/swfdec_as_internal.h
+++ b/libswfdec/swfdec_as_internal.h
@@ -44,7 +44,8 @@ void swfdec_as_function_init_context (S
/* swfdec_as_context.c */
void swfdec_as_context_run_init_script (SwfdecAsContext * context,
const guint8 * data,
- gsize length);
+ gsize length,
+ guint version);
/* swfdec_as_object.c */
typedef SwfdecAsVariableForeach SwfdecAsVariableForeachRemove;
dif...
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
...ec_as_boolean_valueOf, 0);
SWFDEC_AS_VALUE_SET_OBJECT (&val, context->Object_prototype);
diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c
index d16110f..3ec7e0d 100644
--- a/libswfdec/swfdec_as_function.c
+++ b/libswfdec/swfdec_as_function.c
@@ -180,7 +180,8 @@ swfdec_as_function_init_context (SwfdecA
}
context->Function = function;
SWFDEC_AS_VALUE_SET_OBJECT (&val, function);
- swfdec_as_object_set_variable (function, SWFDEC_AS_STR_constructor, &val);
+ swfdec_as_object_set_variable_and_flags (function, SWFDEC_AS_STR_constructor,
+ &val, SWFDEC_AS_VARIABL...
2007 Aug 23
0
10 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_object.c test/trace
...Aug 23 11:45:12 2007 +0300
Unset permanent flag on Function before removing it for version 5
diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c
index 3ec7e0d..5a82064 100644
--- a/libswfdec/swfdec_as_function.c
+++ b/libswfdec/swfdec_as_function.c
@@ -176,6 +176,7 @@ swfdec_as_function_init_context (SwfdecA
return;
if (version < 6) {
/* deleting it later on is easier than duplicating swfdec_as_object_add_function() */
+ swfdec_as_object_unset_variable_flags (context->global, SWFDEC_AS_STR_Function, SWFDEC_AS_VARIABLE_PERMANENT);
swfdec_as_object_delete_variable (con...
2007 Oct 17
0
28 commits - configure.ac debian/changelog debian/control debian/copyright debian/.gitignore debian/libswfdec0.dirs debian/libswfdec0.files debian/libswfdec0.shlibs debian/libswfdec-dev.dirs debian/libswfdec-dev.files debian/rules debian/swf-player.dirs
...return;
+ if (function->priv)
+ swfdec_as_frame_set_security (frame, function->priv);
/* second check especially for super object */
if (thisp != NULL && frame->thisp == NULL)
swfdec_as_frame_set_this (frame, swfdec_as_object_resolve (thisp));
@@ -254,3 +256,21 @@ swfdec_as_function_init_context (SwfdecAsContext *context, guint version)
&val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
}
+/**
+ * swfdec_as_function_set_security:
+ * @fun: a #SwfdecFunction
+ * @sec: the security guarding calls to this function
+ *
+ * Sets the security object guarding execution...
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_internal.h
+++ b/libswfdec/swfdec_as_internal.h
@@ -33,7 +33,8 @@ G_BEGIN_DECLS
void swfdec_as_array_init_context (SwfdecAsContext * context,
guint version);
-/* swfdec_as_function.c */
+
+void swfdec_as_function_set_constructor (SwfdecAsFunction * fun);
void swfdec_as_function_init_context (SwfdecAsContext * context,
guint version);
@@ -53,5 +54,6 @@ void swfdec_as_object_foreach_rename (S
void swfdec_as_object_init_context (SwfdecAsContext * context,
guint version);
+
G_END_DECLS
#endif
diff --git a/libswfdec/swfdec_as_native_function.c b/libswfdec...
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
...: Thu Sep 13 12:58:06 2007 +0300
Set Object.constructor to Function.prototype even in v5
diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c
index 2bf731e..c5b5694 100644
--- a/libswfdec/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);
-...
2007 Sep 13
0
2 commits - libswfdec/swfdec_as_function.c test/trace
...Sep 13 20:42:54 2007 +0200
it's better to initialize correctly than to delete later ;)
diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c
index b00f765..6cc40a4 100644
--- a/libswfdec/swfdec_as_function.c
+++ b/libswfdec/swfdec_as_function.c
@@ -242,16 +242,15 @@ swfdec_as_function_init_context (SwfdecA
proto = swfdec_as_object_new_empty (context);
if (!proto)
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,...
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
...00, 0x00, 0x00, 0x08, 0x07, 0x3D, 0x17, 0x00
+};
+
diff --git a/libswfdec/swfdec_as_internal.h b/libswfdec/swfdec_as_internal.h
index 69db628..e64bc44 100644
--- a/libswfdec/swfdec_as_internal.h
+++ b/libswfdec/swfdec_as_internal.h
@@ -38,6 +38,11 @@ void swfdec_as_function_set_constructor
void swfdec_as_function_init_context (SwfdecAsContext * context,
guint version);
+/* swfdec_as_context.c */
+void swfdec_as_context_run_init_script (SwfdecAsContext * context,
+ const guint8 * data,
+ gsize length);
+
/* swfdec_as_object.c */
typedef SwfdecAsVariableForeach SwfdecAsVariableForeachRemove;...
2007 Sep 12
0
9 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_initialize.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_player_as.c test/trace
..._as_function_do_call (SwfdecAsCont
swfdec_as_context_run (context);
}
-static void
+SWFDEC_AS_NATIVE (101, 11, swfdec_as_function_apply)
+void
swfdec_as_function_apply (SwfdecAsContext *cx, SwfdecAsObject *fun,
guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret)
{
@@ -250,11 +252,6 @@ swfdec_as_function_init_context (SwfdecA
SWFDEC_AS_VALUE_SET_OBJECT (&val, function);
swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR_constructor,
&val, SWFDEC_AS_VARIABLE_HIDDEN | SWFDEC_AS_VARIABLE_PERMANENT);
- /* prototype functions */
- swfdec_as_object_add_function (proto, SWFDEC_AS_S...