Pekka Lampila
2007-Nov-02 10:31 UTC
[Swfdec] 2 commits - libswfdec/swfdec_xml.c libswfdec/swfdec_xml_node.c
libswfdec/swfdec_xml.c | 10 ++++++---- libswfdec/swfdec_xml_node.c | 7 ++++--- 2 files changed, 10 insertions(+), 7 deletions(-) New commits: commit 8890bee87d10d7ee5f6f42e7b594644dc0484ab3 Author: Pekka Lampila <pekka.lampila at iki.fi> Date: Fri Nov 2 12:31:13 2007 +0200 Fix couple of errors I just made, they broke XML support diff --git a/libswfdec/swfdec_xml.c b/libswfdec/swfdec_xml.c index 0613e41..5c52126 100644 --- a/libswfdec/swfdec_xml.c +++ b/libswfdec/swfdec_xml.c @@ -561,8 +561,9 @@ swfdec_xml_parse_tag (SwfdecXml *xml, SwfdecXmlNode **node, const char *p) // create the new element if (!close) { child = swfdec_xml_node_new_no_properties ( - SWFDEC_AS_OBJECT (*node)->context, SWFDEC_XML_NODE_ELEMENT, name); - g_free (name); + SWFDEC_AS_OBJECT (*node)->context, SWFDEC_XML_NODE_ELEMENT, + swfdec_as_context_give_string (SWFDEC_AS_OBJECT (*node)->context, + name)); if (child == NULL) return strchr (p, '\0'); } diff --git a/libswfdec/swfdec_xml_node.c b/libswfdec/swfdec_xml_node.c index 1acad6a..a528896 100644 --- a/libswfdec/swfdec_xml_node.c +++ b/libswfdec/swfdec_xml_node.c @@ -976,8 +976,10 @@ swfdec_xml_node_init_values (SwfdecXmlNode *node, int type, const char* value) node->childNodes = SWFDEC_AS_ARRAY (swfdec_as_array_new (object->context)); - if (node->children == NULL || node->attributes == NULL || node->childNodes) + if (node->children == NULL || node->attributes == NULL || + node->childNodes == NULL) { node->valid = FALSE; + } } static void commit dd072fab855300d58254e88a5cdf8ae83d645abb Author: Pekka Lampila <pekka.lampila at iki.fi> Date: Fri Nov 2 12:17:33 2007 +0200 Make swfdec_xml_node_new take GC'd string as an argument diff --git a/libswfdec/swfdec_xml.c b/libswfdec/swfdec_xml.c index b64b16e..0613e41 100644 --- a/libswfdec/swfdec_xml.c +++ b/libswfdec/swfdec_xml.c @@ -643,8 +643,9 @@ swfdec_xml_parse_text (SwfdecXml *xml, SwfdecXmlNode *node, unescaped = swfdec_xml_unescape (SWFDEC_AS_OBJECT (xml)->context, text); g_free (text); child = swfdec_xml_node_new_no_properties ( - SWFDEC_AS_OBJECT (node)->context, SWFDEC_XML_NODE_TEXT, unescaped); - g_free (unescaped); + SWFDEC_AS_OBJECT (node)->context, SWFDEC_XML_NODE_TEXT, + swfdec_as_context_give_string (SWFDEC_AS_OBJECT (xml)->context, + unescaped)); if (child == NULL) return strchr (p, '\0'); swfdec_xml_node_appendChild (node, child); diff --git a/libswfdec/swfdec_xml_node.c b/libswfdec/swfdec_xml_node.c index 71b7a5c..1acad6a 100644 --- a/libswfdec/swfdec_xml_node.c +++ b/libswfdec/swfdec_xml_node.c @@ -1052,8 +1052,7 @@ swfdec_xml_node_new_no_properties (SwfdecAsContext *context, SWFDEC_AS_VALUE_GET_OBJECT (&val)); } - swfdec_xml_node_init_values (node, type, - swfdec_as_context_get_string (SWFDEC_AS_OBJECT (node)->context, value)); + swfdec_xml_node_init_values (node, type, value); return node; }
Apparently Analagous Threads
- 5 commits - libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml_node.c
- 11 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_sprite_movie_as.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml.h libswfdec/swfdec_xml_node.c libswfdec/swfdec_xml_node.h test/image test/swfdec_test.c test/swfdec_test_image.c test/trace
- 18 commits - libswfdec/swfdec_player_internal.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_format.c libswfdec/swfdec_text_format.h libswfdec/swfdec_xml.c libswfdec/swfdec_xml_node.c libswfdec/swfdec_xml_node.h test/trace
- 5 commits - libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml.h
- 4 commits - libswfdec/swfdec_as_object.c libswfdec/swfdec_movie.c libswfdec/swfdec_policy_loader.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_format.c