search for: g_hash_table_lookup

Displaying 20 results from an estimated 33 matches for "g_hash_table_lookup".

2007 Aug 16
1
Branch 'vivi' - vivified/ui
vivified/ui/main.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) New commits: diff-tree be3bc1a6cd88c0f2294b4f6059898c3989f172eb (from da8a9e9b145d5cb1aebc04764e9ed66856a31c9b) Author: Benjamin Otte <otte at gnome.org> Date: Thu Aug 16 21:42:39 2007 +0200 Set the title correctly diff --git a/vivified/ui/main.c b/vivified/ui/main.c index df123a9..13d03ab 100644 ---
2007 Aug 17
0
Branch 'vivi' - 3 commits - player/Makefile.am player/swfdec_debug_movies.c player/swfdec_debug_movies.h vivified/core vivified/ui
...i++; - continue; - } - break; - } - return i; -} - -static void -swfdec_debug_movies_added (SwfdecPlayer *player, SwfdecMovie *movie, SwfdecDebugMovies *movies) -{ - GtkTreePath *path; - GtkTreeIter iter; - GNode *node, *new; - int pos; - - if (movie->parent) { - node = g_hash_table_lookup (movies->nodes, movie->parent); - g_assert (node); - } else { - node = movies->root; - } - new = g_node_new (movie); - g_hash_table_insert (movies->nodes, movie, new); - pos = swfdec_debug_movies_get_index (node, new); - g_node_insert (node, pos, new); - movies->stamp++;...
2007 May 22
0
Branch 'as' - 9 commits - libswfdec/swfdec_as_frame.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_object.c libswfdec/swfdec_as_script_function.c
...lean ++swfdec_as_object_lookup_case_insensitive (gpointer key, gpointer value, gpointer user_data) ++{ ++ return strcasecmp (key, user_data) == 0; ++} ++ ++static inline SwfdecAsVariable * ++swfdec_as_object_hash_lookup (SwfdecAsObject *object, const char *variable) ++{ ++ SwfdecAsVariable *var = g_hash_table_lookup (object->properties, variable); ++ ++ if (var || object->context->version >= 7) ++ return var; ++ var = g_hash_table_find (object->properties, swfdec_as_object_lookup_case_insensitive, (gpointer) variable); ++ return var; ++} ++ ++static gboolean swfdec_as_object_do_get (Swfd...
2007 Sep 10
0
3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...gs[3]); - } - if (var->watch_recurse <= (object->context->version <= 6 ? 0 : 64)) { - var->watch_recurse++; - swfdec_as_function_call (var->watch, object, 4, args, &ret); + if (object->watches) { + SwfdecAsValue ret = *val; + SwfdecAsWatch *watch = g_hash_table_lookup (object->watches, variable); + /* FIXME: figure out if this limit here is correct. Add a watch in Flash 7 + * and set a variable using Flash 6 */ + if (watch && swfdec_as_watch_can_recurse (watch)) { + SwfdecAsValue args[4]; + SWFDEC_AS_VALUE_SET_STRING (&args[0], va...
2007 Aug 07
0
5 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_keys.h libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_sprite_movie_as.c player/swfdebug.c player/swfdec_debug_movies.c player/swfdec_debug_movies.h test/trace
...ug_movies_added (SwfdecPlayer *player, SwfdecMovie *movie, SwfdecDebugMovies *movies) { - GtkTreePath *path = swfdec_debug_movies_movie_to_path (movie); + GtkTreePath *path; GtkTreeIter iter; + GNode *node, *new; + int pos; - iter.user_data = movie; + if (movie->parent) { + node = g_hash_table_lookup (movies->nodes, movie->parent); + g_assert (node); + } else { + node = movies->root; + } + new = g_node_new (movie); + g_hash_table_insert (movies->nodes, movie, new); + pos = swfdec_debug_movies_get_index (node, new); + g_node_insert (node, pos, new); + movies->stamp++;...
2007 Oct 25
0
6 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_resource.c
...ements diff --git a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c index 7ee4903..93887f4 100644 --- a/libswfdec/swfdec_player.c +++ b/libswfdec/swfdec_player.c @@ -1913,7 +1913,6 @@ swfdec_player_get_export_class (SwfdecPlayer *player, const char *name) SwfdecAsObject *ret; ret = g_hash_table_lookup (player->registered_classes, name); - g_print ("found registered class %p for %p %s\n", ret, name, name); if (ret) { SWFDEC_LOG ("found registered class %p for %s", ret, name); return ret; @@ -1937,7 +1936,6 @@ swfdec_player_set_export_class (SwfdecPlayer *playe...
2012 Feb 14
1
g_hash_table_contains from glib unstable
Hello everybody, current lightdm git uses g_hash_table_contains which was introduced in glib 2.31.8. Is it expected to use unstable glib? -- Best regards, Chris O< ascii ribbon campaign stop html mail - www.asciiribbon.org
2007 Mar 07
0
13 commits - libswfdec/Makefile.am libswfdec/swfdec_js_global.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_root_movie.c libswfdec/swfdec_root_movie.h libswfdec/swfdec_script.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie.c
..., data->character); + } break; default: g_assert_not_reached (); } } } + +gpointer +swfdec_root_movie_get_export (SwfdecRootMovie *root, const char *name) +{ + g_return_val_if_fail (SWFDEC_IS_ROOT_MOVIE (root), NULL); + g_return_val_if_fail (name != NULL, NULL); + + return g_hash_table_lookup (root->exports, name); +} diff-tree 7e360bf529767e33970858e3a79e8b54569a2cc7 (from 5300ffc82f575563dd81f7213db86b55facc83b6) Author: Benjamin Otte <otte@gnome.org> Date: Wed Mar 7 19:39:00 2007 +0100 implement the DoInitAction part of root actions diff --git a/libswfdec/swfdec_root...
2008 Jan 27
2
[Bug 14264] New: flash ad that kills your machine
...94 2.3636 libgobject-2.0.so.0.1400.5 __i686.get_pc_thunk.bx 10001 2.2104 libswfdec-0.5.so.5.0.0 swfdec_player_iterate 7779 1.7193 libswfdec-0.5.so.5.0.0 __i686.get_pc_thunk.bx 7624 1.6850 libswfdec-0.5.so.5.0.0 swfdec_movie_find 6825 1.5084 libglib-2.0.so.0.1400.5 g_hash_table_lookup 6611 1.4611 libswfdec-0.5.so.5.0.0 swfdec_sprite_movie_perform_one_action 6277 1.3873 libgobject-2.0.so.0.1400.5 g_type_check_instance_is_a 5581 1.2335 libswfdec-0.5.so.5.0.0 swfdec_bits_getbits 5581 1.2335 libswfdec-0.5.so.5.0.0 swfdec_sprite_movie_iterate_end 5264...
2007 Mar 28
0
Branch 'as' - 3 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_types.c
..., string, len); @@ -261,7 +263,7 @@ swfdec_as_context_get_string (SwfdecAsCo const char *ret; gsize len; - g_return_val_if_fail (SWFDEC_AS_IS_CONTEXT (context), NULL); + g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); g_return_val_if_fail (string != NULL, NULL); ret = g_hash_table_lookup (context->strings, string); @@ -277,3 +279,111 @@ swfdec_as_context_new (void) { return g_object_new (SWFDEC_TYPE_AS_CONTEXT, NULL); } + +/* defines minimum and maximum versions for which we have seperate scripts */ +#define MINSCRIPTVERSION 3 +#define MAXSCRIPTVERSION 7 +#define EXTRACT_VE...
2007 Mar 09
0
17 commits - libswfdec/js libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_root_movie.c
...ayer->cache = swfdec_cache_new (50 * 1024 * 1024); /* 100 MB */ @@ -1006,6 +1022,44 @@ swfdec_player_initialize (SwfdecPlayer * g_object_notify (G_OBJECT (player), "initialized"); } +jsval +swfdec_player_get_export_class (SwfdecPlayer *player, const char *name) +{ + jsval *val = g_hash_table_lookup (player->registered_classes, name); + + if (val) + return *val; + else + return JSVAL_NULL; +} + +void +swfdec_player_set_export_class (SwfdecPlayer *player, const char *name, jsval val) +{ + jsval *insert; + + g_return_if_fail (SWFDEC_IS_PLAYER (player)); + g_return_if_fail (name !=...
2007 Oct 25
0
4 commits - libswfdec/swfdec_button.h libswfdec/swfdec_button_movie.c libswfdec/swfdec_resource.c libswfdec/swfdec_resource.h libswfdec/swfdec_sprite_movie.c test/trace
...ase_hash, + swfdec_str_case_equal, g_free, g_object_unref); instance->export_names = g_hash_table_new_full (g_direct_hash, g_direct_equal, g_object_unref, g_free); } @@ -290,15 +291,14 @@ swfdec_resource_get_export_name (SwfdecResource *instance, SwfdecCharacter *char return g_hash_table_lookup (instance->export_names, character); } -/* NB: Takes ownership of name and character */ void -swfdec_resource_add_export (SwfdecResource *instance, SwfdecCharacter *character, char *name) +swfdec_resource_add_export (SwfdecResource *instance, SwfdecCharacter *character, const char *name) {...
2007 Oct 18
0
18 commits - doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_flash_security.c
...er); + swfdec_loader_set_target (loader, SWFDEC_LOADER_TARGET (swf)); + + return swf; +} + +gpointer +swfdec_resource_get_export (SwfdecResource *instance, const char *name) +{ + g_return_val_if_fail (SWFDEC_IS_RESOURCE (instance), NULL); + g_return_val_if_fail (name != NULL, NULL); + + return g_hash_table_lookup (instance->exports, name); +} + +const char * +swfdec_resource_get_export_name (SwfdecResource *instance, SwfdecCharacter *character) +{ + g_return_val_if_fail (SWFDEC_IS_RESOURCE (instance), NULL); + g_return_val_if_fail (SWFDEC_IS_CHARACTER (character), NULL); + + return g_hash_table_lookup...
2007 Mar 07
0
11 commits - libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_scriptable.h libswfdec/swfdec_script.c libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h
...ontent = action->data; - if (content->depth == depth) - return content; - break; - case SWFDEC_SPRITE_ACTION_REMOVE: - if (GPOINTER_TO_INT (action->data) == depth) - return NULL; - break; - default: - g_assert_not_reached (); - } - } - } - return NULL; + return g_hash_table_lookup (sprite->live_content, GINT_TO_POINTER (depth)); } static void @@ -184,6 +156,30 @@ swfdec_content_update_lifetime (SwfdecSp content->sequence->end = sprite->parse_frame; } +static void +swfdec_content_update_live (SwfdecSprite *sprite, + SwfdecSpriteActionType type, gpoint...
2007 Aug 21
0
Branch 'vivi' - 15 commits - configure.ac libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_debugger.h libswfdec/swfdec_as_object.c libswfdec/swfdec_movie.c libswfdec/swfdec_script.c libswfdec/swfdec_types.h vivified/core vivified/ui
...viDebugger *debugger, SwfdecAsObject *object, ViviMovieList *movies) { + SwfdecMovie *movie; GtkTreePath *path; GtkTreeIter iter; GNode *node, *new; int pos; + if (!SWFDEC_IS_MOVIE (object)) + return FALSE; + movie = SWFDEC_MOVIE (object); if (movie->parent) { node = g_hash_table_lookup (movies->nodes, movie->parent); g_assert (node); @@ -297,6 +300,7 @@ vivi_movie_list_added (SwfdecPlayer *pla path = vivi_movie_list_node_to_path (new); gtk_tree_model_row_inserted (GTK_TREE_MODEL (movies), path, &iter); gtk_tree_path_free (path); + return FALSE; } stat...
2007 Jan 26
0
Branch 'interpreter' - 9 commits - libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_debugger.c libswfdec/swfdec_debugger.h libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_event.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c
...script, dscript); g_signal_emit (debugger, signals[SCRIPT_ADDED], 0, dscript); } SwfdecDebuggerScript * -swfdec_debugger_get_script (SwfdecDebugger *debugger, JSScript *script) +swfdec_debugger_get_script (SwfdecDebugger *debugger, SwfdecScript *script) { SwfdecDebuggerScript *dscript = g_hash_table_lookup (debugger->scripts, script); @@ -149,7 +170,7 @@ swfdec_debugger_get_script (SwfdecDebugg } void -swfdec_debugger_remove_script (SwfdecDebugger *debugger, JSScript *script) +swfdec_debugger_remove_script (SwfdecDebugger *debugger, SwfdecScript *script) { SwfdecDebuggerScript *dscript =...
2007 Aug 21
0
Branch 'vivi' - 10 commits - libswfdec/swfdec_button_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c vivified/core vivified/dock vivified/ui
...t;data, vivi_movie_list_movie_notify, movies); + } +} + static gboolean vivi_movie_list_removed (ViviDebugger *debugger, SwfdecAsObject *object, ViviMovieList *movies) { @@ -331,11 +343,12 @@ vivi_movie_list_removed (ViviDebugger *d if (!SWFDEC_IS_MOVIE (object)) return FALSE; node = g_hash_table_lookup (movies->nodes, object); - g_hash_table_remove (movies->nodes, object); - g_signal_handlers_disconnect_by_func (object, vivi_movie_list_movie_notify, movies); - path = vivi_movie_list_node_to_path (node); - g_assert (g_node_n_children (node) == 0); + /* happens when parent was already re...
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
...ay 24 19:05:05 2007 +0200 really delete a variable diff --git a/libswfdec/swfdec_as_object.c b/libswfdec/swfdec_as_object.c index bee692a..451d5bc 100644 --- a/libswfdec/swfdec_as_object.c +++ b/libswfdec/swfdec_as_object.c @@ -150,6 +150,9 @@ swfdec_as_object_do_delete (SwfdecAsObje var = g_hash_table_lookup (object->properties, variable); g_assert (var); swfdec_as_object_free_property (NULL, var, object); + if (!g_hash_table_remove (object->properties, variable)) { + g_assert_not_reached (); + } } typedef struct { diff-tree 8e153b97a76a8fa425210bf62dadfcf1aa1e979a (from 9750fc7b35...
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
...t.c +++ b/vivified/ui/vivi_movie_list.c @@ -272,6 +272,62 @@ vivi_movie_list_get_index (GNode *parent return i; } +static void +vivi_movie_list_movie_notify (SwfdecMovie *movie, GParamSpec *pspec, ViviMovieList *movies) +{ + GtkTreeIter iter; + GtkTreePath *path; + GNode *node; + + node = g_hash_table_lookup (movies->nodes, movie); + if (g_str_equal (pspec->name, "depth")) { + guint old, new; + GNode *parent; + + parent = node->parent; + old = g_node_child_position (parent, node); + new = vivi_movie_list_get_index (parent, node); + if (old != new) { + /* reord...
2007 Mar 05
0
11 commits - configure.ac libswfdec/swfdec_js_movie.c libswfdec/swfdec_root_movie.c libswfdec/swfdec_root_movie.h libswfdec/swfdec_script.c libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_swf_decoder.c
...character_data (SwfdecRootMovie *movie, + SwfdecCharacter *character) +{ + CharacterData *data; + + g_return_val_if_fail (SWFDEC_IS_ROOT_MOVIE (movie), NULL); + g_return_val_if_fail (SWFDEC_IS_CHARACTER (character), NULL); + + if (movie->character_data == NULL) + return NULL; + data = g_hash_table_lookup (movie->character_data, character); + if (!data) + return NULL; + return data->data; +} diff --git a/libswfdec/swfdec_root_movie.h b/libswfdec/swfdec_root_movie.h index 59d65db..22fa503 100644 --- a/libswfdec/swfdec_root_movie.h +++ b/libswfdec/swfdec_root_movie.h @@ -43,6 +43,8 @@ struc...