Add g_markup_context_get_user_data
authorMatthias Clasen <matthiasc@src.gnome.org>
Mon, 28 Jul 2008 16:52:15 +0000 (16:52 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 28 Jul 2008 16:52:15 +0000 (16:52 +0000)
svn path=/trunk/; revision=7265

ChangeLog
docs/reference/ChangeLog
docs/reference/glib/glib-sections.txt
glib/glib.symbols
glib/gmarkup.c
glib/gmarkup.h

index 5774648..a418b07 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-07-28  Matthias Clasen  <mclasen@redhat.com>
+
+       Bug 544465 – gmarkup makes it hard to use pre-rolled parsers
+
+       * glib/glib.symbols:
+       * glib/gmarkup.[hc]: Add g_markup_context_get_user_data.
+       Patch by Ryan Lortie
+
 2008-07-28  Tor Lillqvist  <tml@novell.com>
 
        * glib-zip.in: Message catalogs should always get installed into
index b28d39c..1402386 100644 (file)
@@ -1,5 +1,9 @@
 2008-07-28  Matthias Clasen  <mclasen2redhat.com>
 
+       * glib/glib-sections.txt: Add g_markup_context_get_user_data
+
+2008-07-28  Matthias Clasen  <mclasen2redhat.com>
+
        * gio/gio-sections.txt:
        * gio/gio-docs.xml: Add GEmblemedIcon 
 
index 90f9899..d311664 100644 (file)
@@ -1000,6 +1000,7 @@ g_markup_parse_context_free
 g_markup_parse_context_get_position
 g_markup_parse_context_get_element
 g_markup_parse_context_get_element_stack
+g_markup_parse_context_get_user_data
 g_markup_parse_context_new
 g_markup_parse_context_parse
 g_markup_parse_context_push
index d29d692..73e2ae1 100644 (file)
@@ -683,6 +683,7 @@ g_markup_parse_context_free
 g_markup_parse_context_get_element
 g_markup_parse_context_get_element_stack
 g_markup_parse_context_get_position
+g_markup_parse_context_get_user_data
 g_markup_parse_context_new
 g_markup_parse_context_parse
 g_markup_parse_context_push
index 363c57f..05cecd5 100644 (file)
@@ -2020,6 +2020,26 @@ g_markup_parse_context_get_position (GMarkupParseContext *context,
 }
 
 /**
+ * g_markup_parse_context_get_user_data:
+ * @context: a #GMarkupParseContext
+ *
+ * Returns the user_data associated with @context.  This will either
+ * be the user_data that was provided to g_markup_parse_context_new()
+ * or to the most recent call of g_markup_parse_context_push().
+ *
+ * Returns: the provided user_data. The returned data belongs to
+ *     the markup context and will be freed when g_markup_context_free()
+ *     is called.
+ *
+ * Since: 2.18
+ **/
+gpointer
+g_markup_parse_context_get_user_data (GMarkupParseContext *context)
+{
+  return context->user_data;
+}
+
+/**
  * g_markup_parse_context_push:
  * @context: a #GMarkupParseContext
  * @parser: a #GMarkupParser
index 56e87f4..d5fb158 100644 (file)
@@ -126,6 +126,7 @@ G_CONST_RETURN GSList *g_markup_parse_context_get_element_stack (GMarkupParseCon
 void                 g_markup_parse_context_get_position (GMarkupParseContext *context,
                                                           gint                *line_number,
                                                           gint                *char_number);
+gpointer             g_markup_parse_context_get_user_data (GMarkupParseContext *context);
 
 /* useful when saving */
 gchar* g_markup_escape_text (const gchar *text,