Benjamin Otte
2007-Jul-13 15:25 UTC
[Swfdec] 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 libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_native_function.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_types.c libswfdec/swfdec.h libswfdec/swfdec_sprite_movie.c MAINTAINERS
AUTHORS | 4 MAINTAINERS | 1 doc/Makefile.am | 2 doc/swfdec-docs.sgml | 2 doc/swfdec-sections.txt | 78 +++++++++-- libswfdec/Makefile.am | 3 libswfdec/swfdec.h | 1 libswfdec/swfdec_as_array.c | 33 ++++ libswfdec/swfdec_as_array.h | 4 libswfdec/swfdec_as_context.c | 1 libswfdec/swfdec_as_function.c | 36 +++++ libswfdec/swfdec_as_function.h | 4 libswfdec/swfdec_as_internal.h | 56 ++++++++ libswfdec/swfdec_as_interpret.c | 4 libswfdec/swfdec_as_native_function.c | 21 +++ libswfdec/swfdec_as_native_function.h | 1 libswfdec/swfdec_as_object.c | 227 +++++++++++++++++++++++++++++++--- libswfdec/swfdec_as_object.h | 20 -- libswfdec/swfdec_as_types.c | 3 libswfdec/swfdec_sprite_movie.c | 2 20 files changed, 436 insertions(+), 67 deletions(-) New commits: diff-tree 420ca51e53e5a2a9d23ea36be541b04ab434ca6e (from 5e442e22a25b6a18c953992b22299846b9dde706) Author: Benjamin Otte <otte at gnome.org> Date: Fri Jul 13 17:24:59 2007 +0200 add functions to the docs diff --git a/doc/Makefile.am b/doc/Makefile.am index 1a3e287..03bc0da 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -61,6 +61,7 @@ IGNORE_HFILES= \ swfdec_as_math.h \ swfdec_as_number.h \ swfdec_as_scope.h \ + swfdec_as_script_function.h \ swfdec_as_stack.h \ swfdec_as_string.h \ swfdec_as_strings.h \ diff --git a/doc/swfdec-docs.sgml b/doc/swfdec-docs.sgml index 2c7787f..553dfb1 100644 --- a/doc/swfdec-docs.sgml +++ b/doc/swfdec-docs.sgml @@ -27,5 +27,6 @@ <xi:include href="xml/SwfdecAsContext.xml"/> <xi:include href="xml/SwfdecAsObject.xml"/> <xi:include href="xml/SwfdecAsArray.xml"/> + <xi:include href="xml/SwfdecAsFunction.xml"/> </chapter> </book> diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt index fd2f296..7773b37 100644 --- a/doc/swfdec-sections.txt +++ b/doc/swfdec-sections.txt @@ -296,4 +296,35 @@ SWFDEC_AS_ARRAY_CLASS SWFDEC_AS_ARRAY_GET_CLASS SWFDEC_IS_AS_ARRAY SWFDEC_IS_AS_ARRAY_CLASS +SWFDEC_TYPE_AS_ARRAY +</SECTION> + +<SECTION> +<FILE>SwfdecAsFunction</FILE> +<TITLE>SwfdecAsFunction</TITLE> +SwfdecAsFunction +SwfdecAsNative +SwfdecAsNativeFunction +swfdec_as_function_create +swfdec_as_function_call +swfdec_as_native_function_new +swfdec_as_native_function_set_construct_type +swfdec_as_native_function_set_object_type +<SUBSECTION Standard> +swfdec_as_function_get_type +SwfdecAsFunctionClass +SWFDEC_AS_FUNCTION +SWFDEC_AS_FUNCTION_CLASS +SWFDEC_AS_FUNCTION_GET_CLASS +SWFDEC_IS_AS_FUNCTION +SWFDEC_IS_AS_FUNCTION_CLASS +SWFDEC_TYPE_AS_FUNCTION +swfdec_as_native_function_get_type +SwfdecAsNativeFunctionClass +SWFDEC_AS_NATIVE_FUNCTION +SWFDEC_AS_NATIVE_FUNCTION_CLASS +SWFDEC_AS_NATIVE_FUNCTION_GET_CLASS +SWFDEC_IS_AS_NATIVE_FUNCTION +SWFDEC_IS_AS_NATIVE_FUNCTION_CLASS +SWFDEC_TYPE_AS_NATIVE_FUNCTION </SECTION> diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c index f6e040d..466b9d3 100644 --- a/libswfdec/swfdec_as_function.c +++ b/libswfdec/swfdec_as_function.c @@ -30,6 +30,31 @@ G_DEFINE_ABSTRACT_TYPE (SwfdecAsFunction, swfdec_as_function, SWFDEC_TYPE_AS_OBJECT) +/** + * SECTION:SwfdecAsFunction + * @title: SwfdecAsFunction + * @short_description: script objects that can be executed + * + * Functions is the basic object for executing code in the Swfdec script engine. + * There is multiple different variants of functions, such as script-created + * ones and native functions. + * + * If you want to create your own functions, you should create native functions. + * The easiest way to do this is with swfdec_as_object_add_function() or + * swfdec_as_native_function_new(). + * + * In Actionscript, every function can be used as a constructor. If you want to + * make a native function be used as a constructor for your own #SwfdecAsObject + * subclass, have a look at swfdec_as_native_function_set_construct_type(). + */ + +/** + * SwfdecAsFunction + * + * This is the base executable object in Swfdec. It is an abstract object. If + * you want to create functions yourself, use #SwfdecAsNativeFunction. + */ + static void swfdec_as_function_class_init (SwfdecAsFunctionClass *klass) { diff --git a/libswfdec/swfdec_as_function.h b/libswfdec/swfdec_as_function.h index ab3d203..ae3103a 100644 --- a/libswfdec/swfdec_as_function.h +++ b/libswfdec/swfdec_as_function.h @@ -37,6 +37,7 @@ typedef struct _SwfdecAsFunctionClass Sw /* FIXME: do two obejcts, one for scripts and one for native? */ struct _SwfdecAsFunction { + /*< private >*/ SwfdecAsObject object; }; diff --git a/libswfdec/swfdec_as_native_function.c b/libswfdec/swfdec_as_native_function.c index a7554c1..b5b2f81 100644 --- a/libswfdec/swfdec_as_native_function.c +++ b/libswfdec/swfdec_as_native_function.c @@ -40,6 +40,12 @@ * This is the prototype for all native functions. */ +/** + * SwfdecAsNativeFunction: + * + * This is the object type for native functions. + */ + /*** IMPLEMENTATION ***/ G_DEFINE_TYPE (SwfdecAsNativeFunction, swfdec_as_native_function, SWFDEC_TYPE_AS_FUNCTION) @@ -97,6 +103,21 @@ swfdec_as_native_function_init (SwfdecAs { } +/** + * swfdec_as_native_function_new: + * @context: a #SwfdecAsContext + * @name: name of the function + * @native: function to call when executed + * @min_args: minimum number of arguments required + * + * Creates a new native function, that will execute @native when called. The + * @min_args parameter sets a requirement for the minimum number of arguments + * to pass to @native. If the function gets called with less arguments, it + * will just redurn undefined. You might want to use + * swfdec_as_object_add_function() instead of this function. + * + * Returns: a new #SwfdecAsFunction or %NULL on OOM + **/ SwfdecAsFunction * swfdec_as_native_function_new (SwfdecAsContext *context, const char *name, SwfdecAsNative native, guint min_args) diff --git a/libswfdec/swfdec_as_native_function.h b/libswfdec/swfdec_as_native_function.h index cf11331..b5f6232 100644 --- a/libswfdec/swfdec_as_native_function.h +++ b/libswfdec/swfdec_as_native_function.h @@ -37,6 +37,7 @@ typedef struct _SwfdecAsNativeFunctionCl /* FIXME: do two obejcts, one for scripts and one for native? */ struct _SwfdecAsNativeFunction { + /*< private >*/ SwfdecAsFunction function; SwfdecAsNative native; /* native call or NULL when script */ diff-tree 5e442e22a25b6a18c953992b22299846b9dde706 (from 16734160846a05f523af75b5d0fd9e8cc3c34b1a) Author: Benjamin Otte <otte at gnome.org> Date: Fri Jul 13 17:06:13 2007 +0200 document arrays diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt index 68d54fa..fd2f296 100644 --- a/doc/swfdec-sections.txt +++ b/doc/swfdec-sections.txt @@ -280,3 +280,20 @@ SWFDEC_IS_AS_OBJECT SWFDEC_IS_AS_OBJECT_CLASS SWFDEC_TYPE_AS_OBJECT </SECTION> + +<SECTION> +<FILE>SwfdecAsArray</FILE> +<TITLE>SwfdecAsArray</TITLE> +SwfdecAsArray +swfdec_as_array_new +swfdec_as_array_append +swfdec_as_array_push +<SUBSECTION Standard> +swfdec_as_array_get_type +SwfdecAsArrayClass +SWFDEC_AS_ARRAY +SWFDEC_AS_ARRAY_CLASS +SWFDEC_AS_ARRAY_GET_CLASS +SWFDEC_IS_AS_ARRAY +SWFDEC_IS_AS_ARRAY_CLASS +</SECTION> diff --git a/libswfdec/swfdec_as_array.c b/libswfdec/swfdec_as_array.c index fca9951..c37d224 100644 --- a/libswfdec/swfdec_as_array.c +++ b/libswfdec/swfdec_as_array.c @@ -36,6 +36,21 @@ G_DEFINE_TYPE (SwfdecAsArray, swfdec_as_array, SWFDEC_TYPE_AS_OBJECT) +/** + * SECTION:SwfdecAsArray + * @title: SwfdecAsArray + * @short_description: the array object + * + * The array object provides some convenience functions for creating and + * modifying arrays. + */ + +/** + * SwfdecAsArray + * + * This is the type of the array object. + */ + /* * Internal helper functions */ @@ -197,6 +212,23 @@ swfdec_as_array_set_range (SwfdecAsArray } } +/** + * swfdec_as_array_push: + * @array: a #SwfdecAsArray + * @value: the value to add + * + * Adds the given value to the array. This a macro that just calls + * swfdec_as_array_append(). + */ + +/** + * swfdec_as_array_append: + * @array: a #SwfdecAsArray + * @n: number of values to add + * @values: the values to add + * + * Appends the given @values to the array. + **/ void swfdec_as_array_append (SwfdecAsArray *array, guint n, const SwfdecAsValue *value) { diff --git a/libswfdec/swfdec_as_array.h b/libswfdec/swfdec_as_array.h index cdaaf8c..a437301 100644 --- a/libswfdec/swfdec_as_array.h +++ b/libswfdec/swfdec_as_array.h @@ -37,6 +37,7 @@ typedef struct _SwfdecAsArrayClass Swfde #define SWFDEC_AS_ARRAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_AS_ARRAY, SwfdecAsArrayClass)) struct _SwfdecAsArray { + /*< private >*/ SwfdecAsObject object; }; diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c index 4193fdf..1284bea 100644 --- a/libswfdec/swfdec_as_object.c +++ b/libswfdec/swfdec_as_object.c @@ -76,6 +76,19 @@ * Swfdec. You can manually set them with swfdec_as_object_set_variable_flags(). */ +/** + * SwfdecAsVariableForeach: + * @object: The object this function is run on + * @variable: garbage-collected name of the current variables + * @value: value of the current variable + * @flags: Flags associated with the current variable + * @data: User dta passed to swfdec_as_object_foreach() + * + * Function prototype for the swfdec_as_object_foreach() function. + * + * Returns: %TRUE to continue running the foreach function, %FALSE to stop + */ + typedef struct _SwfdecAsVariable SwfdecAsVariable; struct _SwfdecAsVariable { guint flags; /* SwfdecAsVariableFlag values */ diff-tree 16734160846a05f523af75b5d0fd9e8cc3c34b1a (from 198a961482d0cf6f32eac345c364802e10f6afb7) Author: Benjamin Otte <otte at gnome.org> Date: Fri Jul 13 15:48:24 2007 +0200 add more documentation diff --git a/doc/Makefile.am b/doc/Makefile.am index 540729e..1a3e287 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -56,6 +56,7 @@ IGNORE_HFILES= \ jpeg \ swfdec_amf.h \ swfdec_as_boolean.h \ + swfdec_as_internal.h \ swfdec_as_interpret.h \ swfdec_as_math.h \ swfdec_as_number.h \ diff --git a/doc/swfdec-docs.sgml b/doc/swfdec-docs.sgml index 4d1fe45..2c7787f 100644 --- a/doc/swfdec-docs.sgml +++ b/doc/swfdec-docs.sgml @@ -26,5 +26,6 @@ <xi:include href="xml/SwfdecAsValue.xml"/> <xi:include href="xml/SwfdecAsContext.xml"/> <xi:include href="xml/SwfdecAsObject.xml"/> + <xi:include href="xml/SwfdecAsArray.xml"/> </chapter> </book> diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt index 2ac4b92..68d54fa 100644 --- a/doc/swfdec-sections.txt +++ b/doc/swfdec-sections.txt @@ -250,26 +250,26 @@ SWFDEC_TYPE_AS_CONTEXT <FILE>SwfdecAsObject</FILE> <TITLE>SwfdecAsObject</TITLE> SwfdecAsObject -swfdec_as_object_add -swfdec_as_object_add_function -swfdec_as_object_call -swfdec_as_object_collect -swfdec_as_object_create -swfdec_as_object_delete_variable -swfdec_as_object_foreach -swfdec_as_object_get_debug -swfdec_as_object_get_variable -swfdec_as_object_get_variable_and_flags -swfdec_as_object_has_function -swfdec_as_object_init_context swfdec_as_object_new swfdec_as_object_new_empty -swfdec_as_object_resolve -swfdec_as_object_run +swfdec_as_object_create +swfdec_as_object_add swfdec_as_object_set_constructor +SwfdecAsVariableFlag +swfdec_as_object_get_variable +swfdec_as_object_get_variable_and_flags swfdec_as_object_set_variable swfdec_as_object_set_variable_flags swfdec_as_object_unset_variable_flags +swfdec_as_object_delete_variable +SwfdecAsVariableForeach +swfdec_as_object_foreach +swfdec_as_object_has_function +swfdec_as_object_call +swfdec_as_object_run +swfdec_as_object_add_function +swfdec_as_object_get_debug +swfdec_as_object_resolve <SUBSECTION Standard> swfdec_as_object_get_type SwfdecAsObjectClass diff --git a/libswfdec/swfdec_as_internal.h b/libswfdec/swfdec_as_internal.h index 329416f..00d56db 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_object_collect (SwfdecAsObject * object); guint swfdec_as_object_foreach_remove (SwfdecAsObject * object, SwfdecAsVariableForeach func, diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c index d747f3a..4193fdf 100644 --- a/libswfdec/swfdec_as_object.c +++ b/libswfdec/swfdec_as_object.c @@ -26,12 +26,55 @@ #include "swfdec_as_object.h" #include "swfdec_as_context.h" #include "swfdec_as_frame.h" +#include "swfdec_as_internal.h" #include "swfdec_as_native_function.h" #include "swfdec_as_stack.h" #include "swfdec_as_strings.h" #include "swfdec_as_super.h" #include "swfdec_debug.h" +/** + * SECTION:SwfdecAsObject + * @title: SwfdecAsObject + * @short_description: the base object type for scriptable objects + * + * This is the basic object type in Swfdec. Every object used by the script + * engine must be a #SwfdecAsObject. It handles memory management and assigning + * variables to it. Almost all functions that are called on objects require that + * the objects have been added to the garbage collector previously. For + * custom-created objects, you need to do this using swfdec_as_object_add(), + * built-in functions that create objects do this manually. + * + * Note that you cannot know the lifetime of a #SwfdecAsObject, since scripts + * may assign it as a variable to other objects. So you should not assume to + * know when an object gets removed. + */ + +/** + * SwfdecAsObject: + * @object: do not access + * @context: the context the object was added to or %NULL if it has not yet been + * added. Read-only. + * + * Every object value inside the Swfdec script engine must be a SwfdecAsObject. + * If you want to add custom objects to your script engine, you need to create a + * subclass. The class provides a number of virtual functions that you can + * override to achieve the desired behaviour. + */ + +/** + * SwfdecAsVariableFlag: + * @SWFDEC_AS_VARIABLE_DONT_ENUM: 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_object_set_variable(). + * @SWFDEC_AS_VARIABLE_NATIVE: The variable is implemented natively. + * + * These flags are used to describe various properties of a variable inside + * Swfdec. You can manually set them with swfdec_as_object_set_variable_flags(). + */ typedef struct _SwfdecAsVariable SwfdecAsVariable; struct _SwfdecAsVariable { @@ -413,6 +456,16 @@ swfdec_as_object_collect (SwfdecAsObject g_object_unref (object); } +/** + * swfdec_as_object_set_variable: + * @object: a #SwfdecAsObject + * @variable: garbage-collected name of the variable to set + * @value: value to set the variable to + * + * Sets a variable on @object. It is not guaranteed that getting the variable + * after setting it results in the same value, as some variables can be + * read-only or require a specific type. + **/ void swfdec_as_object_set_variable (SwfdecAsObject *object, const char *variable, const SwfdecAsValue *value) @@ -427,6 +480,34 @@ swfdec_as_object_set_variable (SwfdecAsO klass->set (object, variable, value); } +/** + * swfdec_as_object_get_variable: + * @object: a #SwfdecAsObject + * @variable: a garbage-collected string containing the name of the variable + * @value: pointer to a #SwfdecAsValue that takes the return value or %NULL + * + * Gets the value of the given @variable on @object. It walks the prototype + * chain. This is a shortcut macro for + * swfdec_as_object_get_variable_and_flags(). + * + * Returns: %TRUE if the variable existed, %FALSE otherwise + */ + +/** + * swfdec_as_object_get_variable_and_flags: + * @object: a #SwfdecAsObject + * @variable: a garbage-collected string containing the name of the variable + * @value: pointer to a #SwfdecAsValue that takes the return value or %NULL + * @flags: pointer to a guint taking the variable's flags or %NULL + * @pobject: pointer to set to the object that really holds the property or + * %NULL + * + * Looks up @variable on @object. It also walks the object's prototype chain. + * If the variable exists, its value, flags and the real object containing the + * variable will be set and %TRUE will be returned. + * + * Returns: %TRUE if the variable exists, %FALSE otherwise + **/ gboolean swfdec_as_object_get_variable_and_flags (SwfdecAsObject *object, const char *variable, SwfdecAsValue *value, guint *flags, SwfdecAsObject **pobject) @@ -468,6 +549,18 @@ swfdec_as_object_get_variable_and_flags return FALSE; } +/** + * swfdec_as_object_delete_variable: + * @object: a #SwfdecAsObject + * @variable: garbage-collected name of the variable + * + * Deletes the given variable if possible. If the variable is protected from + * deletion, it will not be deleted. + * + * Returns: %TRUE if the variable existed. Note that this doesn't mean that the + * variable was actually removed. Permanent variables for example + * cannot be removed. + **/ gboolean swfdec_as_object_delete_variable (SwfdecAsObject *object, const char *variable) { @@ -523,6 +616,17 @@ swfdec_as_object_unset_variable_flags (S klass->set_flags (object, variable, 0, flags); } +/** + * swfdec_as_object_foreach: + * @object: a #SwfdecAsObject + * @func: function to call + * @data: data to pass to @func + * + * Calls @func for every variable of @object or until @func returns %FALSE. The + * variables of @object must not be modified by @func. + * + * Returns: %TRUE if @func always returned %TRUE + **/ gboolean swfdec_as_object_foreach (SwfdecAsObject *object, SwfdecAsVariableForeach func, gpointer data) @@ -650,6 +754,16 @@ swfdec_as_object_call (SwfdecAsObject *o swfdec_as_context_run (object->context); } +/** + * swfdec_as_object_has_function: + * @object: a #SwfdecAsObject + * @name: garbage-collected name of th function + * + * Convenience function that checks of @object has a variable that references + * a function. + * + * Returns: %TRUE if object.name is a function. + **/ gboolean swfdec_as_object_has_function (SwfdecAsObject *object, const char *name) { @@ -673,7 +787,7 @@ swfdec_as_object_has_function (SwfdecAsO * Creates a new object for the given constructor and pushes the constructor on * top of the stack. To actually run the constructor, you need to call * swfdec_as_context_run(). After the constructor has been run, the new object - * will be pushed on top of the stack. + * will be pushed to the top of the stack. **/ void swfdec_as_object_create (SwfdecAsFunction *fun, guint n_args, @@ -845,6 +959,16 @@ swfdec_as_variable_set (SwfdecAsVariable var->value = *value; } +/** + * swfdec_as_object_get_debug: + * @object: a #SwfdecAsObject + * + * Gets a representation string suitable for debugging. This function is + * guaranteed to not modify the state of the script engine, unlike + * swfdec_as_value_to_string() for example. + * + * Returns: A newly allocated string. Free it with g_free() after use. + **/ char * swfdec_as_object_get_debug (SwfdecAsObject *object) { diff --git a/libswfdec/swfdec_as_object.h b/libswfdec/swfdec_as_object.h index 8425e0d..d109a72 100644 --- a/libswfdec/swfdec_as_object.h +++ b/libswfdec/swfdec_as_object.h @@ -39,9 +39,6 @@ typedef enum { typedef struct _SwfdecAsObjectClass SwfdecAsObjectClass; typedef gboolean (* SwfdecAsVariableForeach) (SwfdecAsObject *object, const char *variable, SwfdecAsValue *value, guint flags, gpointer data); -typedef SwfdecAsVariableForeach SwfdecAsVariableForeachRemove; -typedef const char *(* SwfdecAsVariableForeachRename) (SwfdecAsObject *object, - const char *variable, SwfdecAsValue *value, guint flags, gpointer data); #define SWFDEC_TYPE_AS_OBJECT (swfdec_as_object_get_type()) #define SWFDEC_IS_AS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_AS_OBJECT)) diff-tree 198a961482d0cf6f32eac345c364802e10f6afb7 (from 3db929b86a8b227b69df0f36196c5da1ccbf4483) Author: Benjamin Otte <otte at gnome.org> Date: Fri Jul 13 13:10:37 2007 +0200 swfdec_as_object_collect() is internal diff --git a/libswfdec/swfdec_as_internal.h b/libswfdec/swfdec_as_internal.h index 49c982c..329416f 100644 --- a/libswfdec/swfdec_as_internal.h +++ b/libswfdec/swfdec_as_internal.h @@ -37,6 +37,7 @@ void swfdec_as_function_init_context (S guint version); /* swfdec_as_object.c */ +void swfdec_as_object_collect (SwfdecAsObject * object); guint swfdec_as_object_foreach_remove (SwfdecAsObject * object, SwfdecAsVariableForeach func, gpointer data); diff --git a/libswfdec/swfdec_as_object.h b/libswfdec/swfdec_as_object.h index 49d244f..8425e0d 100644 --- a/libswfdec/swfdec_as_object.h +++ b/libswfdec/swfdec_as_object.h @@ -112,7 +112,6 @@ char * swfdec_as_object_get_debug (Swfd void swfdec_as_object_add (SwfdecAsObject * object, SwfdecAsContext * context, gsize size); -void swfdec_as_object_collect (SwfdecAsObject * object); /* I'd like to name these [gs]et_property, but binding authors will complain * about overlap with g_object_[gs]et_property then */ diff-tree 3db929b86a8b227b69df0f36196c5da1ccbf4483 (from 521ac1b3397c1f224f07287b0a26505539101e0b) Author: Benjamin Otte <otte at gnome.org> Date: Fri Jul 13 13:09:20 2007 +0200 add more documentation diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c index f2b7bf5..d747f3a 100644 --- a/libswfdec/swfdec_as_object.c +++ b/libswfdec/swfdec_as_object.c @@ -317,6 +317,17 @@ swfdec_as_object_init (SwfdecAsObject *o { } +/** + * swfdec_as_object_new_empty: + * @context: a #SwfdecAsContext + * + * Creates an empty object. The prototype and constructor properties of the + * returned object will not be set. You probably want to call + * swfdec_as_object_set_constructor() on the returned object yourself. + * You may want to use swfdec_as_object_new() instead. + * + * Returns: A new #SwfdecAsObject adde to @context or %NULL on OOM. + **/ SwfdecAsObject * swfdec_as_object_new_empty (SwfdecAsContext *context) { @@ -337,7 +348,6 @@ swfdec_as_object_new_empty (SwfdecAsCont * * Allocates a new Object. This does the same as the Actionscript code * "new Object()". - * <warning>This function may run the garbage collector.</warning> * * Returns: the new object or NULL on out of memory. **/ @@ -662,8 +672,8 @@ swfdec_as_object_has_function (SwfdecAsO * * Creates a new object for the given constructor and pushes the constructor on * top of the stack. To actually run the constructor, you need to call - * swfdec_as_context_run() yourself. After the constructor has been run, the new - * object will be pushed on top of the stack. + * swfdec_as_context_run(). After the constructor has been run, the new object + * will be pushed on top of the stack. **/ void swfdec_as_object_create (SwfdecAsFunction *fun, guint n_args, @@ -715,6 +725,21 @@ swfdec_as_object_create (SwfdecAsFunctio context->frame->construct = TRUE; } +/** + * swfdec_as_object_set_constructor: + * @object: a #SwfdecAsObject + * @construct: the constructor of @object + * @scripted: %TRUE if this object was created by a script. Flash sets the + * property named "__constructor__" on script-created objects, but + * "constructor" on native ones. + * + * Sets the constructor variables for @object. Most objects get these + * variables set automatically, but for objects you created yourself, you want + * to call this function. This is essentially the same as the following script + * code: + * |[ object.__constructor__ = construct; + * object.__proto__ = construct.prototype; ]| + **/ void swfdec_as_object_set_constructor (SwfdecAsObject *object, SwfdecAsObject *construct, gboolean scripted) { diff-tree 521ac1b3397c1f224f07287b0a26505539101e0b (from b0669a9ca2e09fd79868c9cdb66af8de2360bb9c) Author: Benjamin Otte <otte at gnome.org> Date: Fri Jul 13 12:52:08 2007 +0200 make swfdec_as_object_foreach_rename() and swfdec_as_object_foreach_rename() internal also document them diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt index 33565a8..2ac4b92 100644 --- a/doc/swfdec-sections.txt +++ b/doc/swfdec-sections.txt @@ -257,8 +257,6 @@ swfdec_as_object_collect swfdec_as_object_create swfdec_as_object_delete_variable swfdec_as_object_foreach -swfdec_as_object_foreach_remove -swfdec_as_object_foreach_rename swfdec_as_object_get_debug swfdec_as_object_get_variable swfdec_as_object_get_variable_and_flags diff --git a/libswfdec/swfdec_as_array.c b/libswfdec/swfdec_as_array.c index c5070c8..fca9951 100644 --- a/libswfdec/swfdec_as_array.c +++ b/libswfdec/swfdec_as_array.c @@ -29,6 +29,7 @@ #include "swfdec_as_context.h" #include "swfdec_as_frame.h" #include "swfdec_as_function.h" +#include "swfdec_as_internal.h" #include "swfdec_as_native_function.h" #include "swfdec_as_strings.h" #include "swfdec_debug.h" diff --git a/libswfdec/swfdec_as_internal.h b/libswfdec/swfdec_as_internal.h index aa192f8..49c982c 100644 --- a/libswfdec/swfdec_as_internal.h +++ b/libswfdec/swfdec_as_internal.h @@ -37,6 +37,13 @@ void swfdec_as_function_init_context (S guint version); /* swfdec_as_object.c */ +guint swfdec_as_object_foreach_remove (SwfdecAsObject * object, + SwfdecAsVariableForeach func, + gpointer data); +void swfdec_as_object_foreach_rename (SwfdecAsObject * object, + SwfdecAsVariableForeachRename func, + gpointer data); + void swfdec_as_object_init_context (SwfdecAsContext * context, guint version); diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c index f9bf7ac..f2b7bf5 100644 --- a/libswfdec/swfdec_as_object.c +++ b/libswfdec/swfdec_as_object.c @@ -212,12 +212,26 @@ swfdec_as_object_hash_foreach_remove (gp return TRUE; } +/** + * swfdec_as_object_foreach_remove: + * @object: a #SwfdecAsObject + * @func: function that determines which object to remove + * @data: data to pass to @func + * + * Removes all variables form @object where @func returns %TRUE. This is an + * internal function for array operations. + * + * Returns: he number of variables removed + **/ guint swfdec_as_object_foreach_remove (SwfdecAsObject *object, SwfdecAsVariableForeach func, gpointer data) { ForeachRemoveData fdata = { object, func, data }; + g_return_val_if_fail (SWFDEC_IS_AS_OBJECT (object), 0); + g_return_val_if_fail (func != NULL, 0); + return g_hash_table_foreach_remove (object->properties, swfdec_as_object_hash_foreach_remove, &fdata); } @@ -246,13 +260,27 @@ swfdec_as_object_hash_foreach_rename (gp return TRUE; } +/** + * swfdec_as_object_foreach_rename: + * @object: a #SwfdecAsObject + * @func: function determining the new name + * @data: data to pass to @func + * + * Calls @func for each variable of @object. If The function is then supposed + * to return the new name of the variable or %NULL if the variable should be + * removed. This is an internal function for array operations. + **/ void swfdec_as_object_foreach_rename (SwfdecAsObject *object, SwfdecAsVariableForeachRename func, gpointer data) { - GHashTable *properties_new = g_hash_table_new (g_direct_hash, g_direct_equal); + GHashTable *properties_new; ForeachRenameData fdata = { object, properties_new, func, data }; + g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); + g_return_if_fail (func != NULL); + + properties_new = g_hash_table_new (g_direct_hash, g_direct_equal); g_hash_table_foreach_remove (object->properties, swfdec_as_object_hash_foreach_rename, &fdata); g_hash_table_destroy (object->properties); object->properties = properties_new; diff --git a/libswfdec/swfdec_as_object.h b/libswfdec/swfdec_as_object.h index 0afa5a8..49d244f 100644 --- a/libswfdec/swfdec_as_object.h +++ b/libswfdec/swfdec_as_object.h @@ -140,12 +140,6 @@ void swfdec_as_object_unset_variable_fl gboolean swfdec_as_object_foreach (SwfdecAsObject * object, SwfdecAsVariableForeach func, gpointer data); -guint swfdec_as_object_foreach_remove (SwfdecAsObject * object, - SwfdecAsVariableForeach func, - gpointer data); -void swfdec_as_object_foreach_rename (SwfdecAsObject * object, - SwfdecAsVariableForeachRename func, - gpointer data); SwfdecAsFunction *swfdec_as_object_add_function (SwfdecAsObject * object, const char * name, diff-tree b0669a9ca2e09fd79868c9cdb66af8de2360bb9c (from e5d9d41d284a3a4afea400591bbb0029b5cf3453) Author: Benjamin Otte <otte at gnome.org> Date: Fri Jul 13 10:05:38 2007 +0200 install swfdec_as_object.h diff --git a/libswfdec/Makefile.am b/libswfdec/Makefile.am index 3e8be5d..1e06a10 100644 --- a/libswfdec/Makefile.am +++ b/libswfdec/Makefile.am @@ -121,6 +121,7 @@ libswfdec_ at SWFDEC_MAJORMINOR@_la_LDFLAGS public_headers = \ swfdec.h \ swfdec_as_context.h \ + swfdec_as_object.h \ swfdec_as_types.h \ swfdec_audio.h \ swfdec_buffer.h \ @@ -141,7 +142,6 @@ noinst_HEADERS = \ swfdec_as_math.h \ swfdec_as_native_function.h \ swfdec_as_number.h \ - swfdec_as_object.h \ swfdec_as_scope.h \ swfdec_as_script_function.h \ swfdec_as_stack.h \ diff-tree e5d9d41d284a3a4afea400591bbb0029b5cf3453 (from 03af4a28a5866a07a685597477a4f768ab10729a) Author: Benjamin Otte <otte at gnome.org> Date: Fri Jul 13 10:04:53 2007 +0200 put stuff that shouldn't be exported into an internal header diff --git a/libswfdec/Makefile.am b/libswfdec/Makefile.am index 77e166e..3e8be5d 100644 --- a/libswfdec/Makefile.am +++ b/libswfdec/Makefile.am @@ -136,6 +136,7 @@ noinst_HEADERS = \ swfdec_as_boolean.h \ swfdec_as_frame.h \ swfdec_as_function.h \ + swfdec_as_internal.h \ swfdec_as_interpret.h \ swfdec_as_math.h \ swfdec_as_native_function.h \ diff --git a/libswfdec/swfdec_as_array.h b/libswfdec/swfdec_as_array.h index 5fac3bf..cdaaf8c 100644 --- a/libswfdec/swfdec_as_array.h +++ b/libswfdec/swfdec_as_array.h @@ -54,9 +54,6 @@ void swfdec_as_array_append (SwfdecAsA guint n, const SwfdecAsValue * values); -void swfdec_as_array_init_context (SwfdecAsContext * context, - guint version); - G_END_DECLS #endif diff --git a/libswfdec/swfdec_as_context.c b/libswfdec/swfdec_as_context.c index 1b444e2..8a5c20d 100644 --- a/libswfdec/swfdec_as_context.c +++ b/libswfdec/swfdec_as_context.c @@ -28,6 +28,7 @@ #include "swfdec_as_boolean.h" #include "swfdec_as_frame.h" #include "swfdec_as_function.h" +#include "swfdec_as_internal.h" #include "swfdec_as_interpret.h" #include "swfdec_as_math.h" #include "swfdec_as_native_function.h" diff --git a/libswfdec/swfdec_as_function.c b/libswfdec/swfdec_as_function.c index b68d7c4..f6e040d 100644 --- a/libswfdec/swfdec_as_function.c +++ b/libswfdec/swfdec_as_function.c @@ -40,6 +40,17 @@ swfdec_as_function_init (SwfdecAsFunctio { } +/** + * swfdec_as_function_create: + * @context: a #SwfdecAsFunction + * @type: the type of function to create + * @size: size of @type + * + * Creates a new function. The function will be of @type. It will be added to + * @context and its prototype and constructor object will be set correctly. + * + * Returns: a new object of @type or %NULL on OOM + **/ SwfdecAsFunction * swfdec_as_function_create (SwfdecAsContext *context, GType type, guint size) { diff --git a/libswfdec/swfdec_as_function.h b/libswfdec/swfdec_as_function.h index 8554c77..ab3d203 100644 --- a/libswfdec/swfdec_as_function.h +++ b/libswfdec/swfdec_as_function.h @@ -59,9 +59,6 @@ void swfdec_as_function_call (SwfdecA const SwfdecAsValue * args, SwfdecAsValue * return_value); -void swfdec_as_function_init_context (SwfdecAsContext * context, - guint version); - G_END_DECLS #endif diff --git a/libswfdec/swfdec_as_internal.h b/libswfdec/swfdec_as_internal.h new file mode 100644 index 0000000..aa192f8 --- /dev/null +++ b/libswfdec/swfdec_as_internal.h @@ -0,0 +1,44 @@ +/* Swfdec + * Copyright (C) 2007 Benjamin Otte <otte at gnome.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + */ + +#ifndef _SWFDEC_AS_INTERNAL_H_ +#define _SWFDEC_AS_INTERNAL_H_ + +#include <libswfdec/swfdec_as_types.h> + +G_BEGIN_DECLS + +/* This header contains all the non-exported symbols that can't go into + * exported headers + */ + +/* swfdec_as_array.c */ +void swfdec_as_array_init_context (SwfdecAsContext * context, + guint version); + +/* swfdec_as_function.c */ +void swfdec_as_function_init_context (SwfdecAsContext * context, + guint version); + +/* swfdec_as_object.c */ +void swfdec_as_object_init_context (SwfdecAsContext * context, + guint version); + +G_END_DECLS +#endif diff --git a/libswfdec/swfdec_as_object.h b/libswfdec/swfdec_as_object.h index 09318cb..0afa5a8 100644 --- a/libswfdec/swfdec_as_object.h +++ b/libswfdec/swfdec_as_object.h @@ -162,9 +162,6 @@ void swfdec_as_object_call (SwfdecAsOb guint argc, SwfdecAsValue * argv, SwfdecAsValue * return_value); - -void swfdec_as_object_init_context (SwfdecAsContext * context, - guint version); G_END_DECLS diff-tree 03af4a28a5866a07a685597477a4f768ab10729a (from c94bf3153af1b18a27f21185bd5d14a5a8a3232a) Author: Benjamin Otte <otte at gnome.org> Date: Fri Jul 13 09:58:14 2007 +0200 remove scripted argument from swfdec_as_object_create() diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index 938165e..d011028 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -1360,7 +1360,7 @@ swfdec_action_new_object (SwfdecAsContex } swfdec_as_stack_pop_n (cx, 2); - swfdec_as_object_create (fun, n_args, NULL, TRUE); + swfdec_as_object_create (fun, n_args, NULL); return; fail: @@ -1397,7 +1397,7 @@ swfdec_action_new_method (SwfdecAsContex } swfdec_as_stack_pop_n (cx, 3); - swfdec_as_object_create (fun, n_args, NULL, TRUE); + swfdec_as_object_create (fun, n_args, NULL); return; fail: diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c index 02fdeae..f9bf7ac 100644 --- a/libswfdec/swfdec_as_object.c +++ b/libswfdec/swfdec_as_object.c @@ -631,8 +631,6 @@ swfdec_as_object_has_function (SwfdecAsO * @fun: constructor * @n_args: number of arguments * @args: arguments to pass to constructor - * @scripted: If this variable is %TRUE, the variable "constructor" will be - * named "__constructor__" * * Creates a new object for the given constructor and pushes the constructor on * top of the stack. To actually run the constructor, you need to call @@ -641,7 +639,7 @@ swfdec_as_object_has_function (SwfdecAsO **/ void swfdec_as_object_create (SwfdecAsFunction *fun, guint n_args, - const SwfdecAsValue *args, gboolean scripted) + const SwfdecAsValue *args) { SwfdecAsObject *new; SwfdecAsContext *context; @@ -649,13 +647,13 @@ swfdec_as_object_create (SwfdecAsFunctio guint size; GType type = 0; - g_return_if_fail (SWFDEC_IS_AS_FUNCTION (construct)); + g_return_if_fail (SWFDEC_IS_AS_FUNCTION (fun)); - context = SWFDEC_AS_OBJECT (construct)->context; - cur = construct; + context = SWFDEC_AS_OBJECT (fun)->context; + cur = fun; while (type == 0 && cur != NULL) { - if (SWFDEC_IS_AS_NATIVE_FUNCTION (construct)) { - SwfdecAsNativeFunction *native = SWFDEC_AS_NATIVE_FUNCTION (construct); + if (SWFDEC_IS_AS_NATIVE_FUNCTION (cur)) { + SwfdecAsNativeFunction *native = SWFDEC_AS_NATIVE_FUNCTION (cur); if (native->construct_size) { type = native->construct_type; size = native->construct_size; @@ -684,8 +682,8 @@ swfdec_as_object_create (SwfdecAsFunctio return; new = g_object_new (type, NULL); swfdec_as_object_add (new, context, size); - swfdec_as_object_set_constructor (new, SWFDEC_AS_OBJECT (construct), FALSE); - swfdec_as_function_call (construct, new, n_args, args, NULL); + swfdec_as_object_set_constructor (new, SWFDEC_AS_OBJECT (fun), FALSE); + swfdec_as_function_call (fun, new, n_args, args, NULL); context->frame->construct = TRUE; } diff --git a/libswfdec/swfdec_as_object.h b/libswfdec/swfdec_as_object.h index d20df5d..09318cb 100644 --- a/libswfdec/swfdec_as_object.h +++ b/libswfdec/swfdec_as_object.h @@ -102,8 +102,7 @@ SwfdecAsObject *swfdec_as_object_new (S SwfdecAsObject *swfdec_as_object_new_empty (SwfdecAsContext * context); void swfdec_as_object_create (SwfdecAsFunction * fun, guint n_args, - const SwfdecAsValue * args, - gboolean scripted); + const SwfdecAsValue * args); void swfdec_as_object_set_constructor(SwfdecAsObject * object, SwfdecAsObject * construct, gboolean scripted); diff --git a/libswfdec/swfdec_as_types.c b/libswfdec/swfdec_as_types.c index 64f7de5..8282996 100644 --- a/libswfdec/swfdec_as_types.c +++ b/libswfdec/swfdec_as_types.c @@ -549,7 +549,7 @@ swfdec_as_value_to_object (SwfdecAsConte if (!SWFDEC_AS_VALUE_IS_OBJECT (&val) || !SWFDEC_IS_AS_FUNCTION (fun = (SwfdecAsFunction *) SWFDEC_AS_VALUE_GET_OBJECT (&val))) return NULL; - swfdec_as_object_create (fun, 1, value, TRUE); + swfdec_as_object_create (fun, 1, value); swfdec_as_context_run (context); value = swfdec_as_stack_pop (context); if (SWFDEC_AS_VALUE_IS_OBJECT (value)) { diff-tree c94bf3153af1b18a27f21185bd5d14a5a8a3232a (from b062a5b2c9be1874e6f18dd67341acd45bb2a1b4) Author: Benjamin Otte <otte at gnome.org> Date: Fri Jul 13 09:54:06 2007 +0200 remove SWFDEC_AS_OBJECT_HAS_CONTEXT This must implicitly be true for pretty much every function, so don't check it. Also fix some doc issues diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c index 3f81101..02fdeae 100644 --- a/libswfdec/swfdec_as_object.c +++ b/libswfdec/swfdec_as_object.c @@ -46,7 +46,7 @@ swfdec_as_object_dispose (GObject *gobje { SwfdecAsObject *object = SWFDEC_AS_OBJECT (gobject); - g_assert (!SWFDEC_AS_OBJECT_HAS_CONTEXT (object)); + g_assert (object->properties == NULL); G_OBJECT_CLASS (swfdec_as_object_parent_class)->dispose (gobject); } @@ -350,7 +350,7 @@ swfdec_as_object_add (SwfdecAsObject *ob g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); g_return_if_fail (SWFDEC_IS_AS_CONTEXT (context)); - g_return_if_fail (!SWFDEC_AS_OBJECT_HAS_CONTEXT (object)); + g_return_if_fail (object->properties == NULL); object->context = context; object->size = size; @@ -365,7 +365,7 @@ void swfdec_as_object_collect (SwfdecAsObject *object) { g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); - g_return_if_fail (SWFDEC_AS_OBJECT_HAS_CONTEXT (object)); + g_return_if_fail (object->properties != NULL); g_hash_table_foreach (object->properties, swfdec_as_object_free_property, object); g_hash_table_destroy (object->properties); @@ -562,7 +562,6 @@ swfdec_as_object_run (SwfdecAsObject *ob SwfdecAsFrame *frame; g_return_if_fail (SWFDEC_IS_AS_OBJECT (object)); - g_return_if_fail (SWFDEC_AS_OBJECT_HAS_CONTEXT (object)); g_return_if_fail (script != NULL); context = object->context; @@ -629,7 +628,7 @@ swfdec_as_object_has_function (SwfdecAsO /** * swfdec_as_object_create: - * @construct: constructor + * @fun: constructor * @n_args: number of arguments * @args: arguments to pass to constructor * @scripted: If this variable is %TRUE, the variable "constructor" will be @@ -641,7 +640,7 @@ swfdec_as_object_has_function (SwfdecAsO * object will be pushed on top of the stack. **/ void -swfdec_as_object_create (SwfdecAsFunction *construct, guint n_args, +swfdec_as_object_create (SwfdecAsFunction *fun, guint n_args, const SwfdecAsValue *args, gboolean scripted) { SwfdecAsObject *new; diff --git a/libswfdec/swfdec_as_object.h b/libswfdec/swfdec_as_object.h index 0236bf5..d20df5d 100644 --- a/libswfdec/swfdec_as_object.h +++ b/libswfdec/swfdec_as_object.h @@ -50,8 +50,6 @@ typedef const char *(* SwfdecAsVariableF #define SWFDEC_AS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_AS_OBJECT, SwfdecAsObjectClass)) #define SWFDEC_AS_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_AS_OBJECT, SwfdecAsObjectClass)) -#define SWFDEC_AS_OBJECT_HAS_CONTEXT(obj) (SWFDEC_AS_OBJECT (obj)->properties != NULL) - struct _SwfdecAsObject { GObject object; @@ -102,7 +100,7 @@ GType swfdec_as_object_get_type (void); SwfdecAsObject *swfdec_as_object_new (SwfdecAsContext * context); SwfdecAsObject *swfdec_as_object_new_empty (SwfdecAsContext * context); -void swfdec_as_object_create (SwfdecAsFunction * construct, +void swfdec_as_object_create (SwfdecAsFunction * fun, guint n_args, const SwfdecAsValue * args, gboolean scripted); diff --git a/libswfdec/swfdec_as_types.c b/libswfdec/swfdec_as_types.c index 98d61d7..64f7de5 100644 --- a/libswfdec/swfdec_as_types.c +++ b/libswfdec/swfdec_as_types.c @@ -605,7 +605,6 @@ return FALSE; /** * swfdec_as_value_to_primitive: -* @context: a #SwfdecAsContext * @value: value to convert * * Tries to convert the given @value inline to its primitive value. Primitive diff --git a/libswfdec/swfdec_sprite_movie.c b/libswfdec/swfdec_sprite_movie.c index 8bac537..bbe4999 100644 --- a/libswfdec/swfdec_sprite_movie.c +++ b/libswfdec/swfdec_sprite_movie.c @@ -702,7 +702,7 @@ swfdec_sprite_movie_mark (SwfdecAsObject for (walk = SWFDEC_MOVIE (object)->list; walk; walk = walk->next) { SwfdecAsObject *child = walk->data; - g_assert (SWFDEC_AS_OBJECT_HAS_CONTEXT (child)); + g_assert (child->properties != NULL); swfdec_as_object_mark (child); } diff-tree b062a5b2c9be1874e6f18dd67341acd45bb2a1b4 (from 9dbe249d4544cdec12e62f9a61b4f7caeb21051a) Author: Benjamin Otte <otte at gnome.org> Date: Fri Jul 13 09:54:01 2007 +0200 include swfdec_as_object.h diff --git a/libswfdec/swfdec.h b/libswfdec/swfdec.h index c527798..6af4d0a 100644 --- a/libswfdec/swfdec.h +++ b/libswfdec/swfdec.h @@ -29,6 +29,7 @@ #include <libswfdec/swfdec_player.h> #include <libswfdec/swfdec_as_context.h> +#include <libswfdec/swfdec_as_object.h> #include <libswfdec/swfdec_as_types.h> #endif diff-tree 9dbe249d4544cdec12e62f9a61b4f7caeb21051a (from 576a51e3a4a0e2a9d4c6c4e031ef27ba62b8199a) Author: Benjamin Otte <otte at gnome.org> Date: Fri Jul 13 09:46:47 2007 +0200 fix AUTHORS and MAINTAINERS diff --git a/AUTHORS b/AUTHORS index 4c004b0..9b941b6 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,2 +1,6 @@ +Andreas Henriksson <andreas at fatal.se> Benjamin Otte <otte at gnome.org> David Schleef <ds at schleef.org> +Eric Anholt <eric at anholt.net> +Nguy???n Th??i Ng???c Duy <pclouds at gmail.com> +Pekka Lampila <pekka.lampila at iki.fi> diff --git a/MAINTAINERS b/MAINTAINERS index 4c004b0..4f8b31b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1,2 +1 @@ Benjamin Otte <otte at gnome.org> -David Schleef <ds at schleef.org>
Reasonably Related Threads
- 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
- 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
- 3 commits - doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c
- 5 commits - doc/Makefile.am doc/swfdec-sections.txt libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.c libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_native_function.h
- Branch 'as' - 24 commits - configure.ac doc/Makefile.am doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_amf.c libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c