[glib/ebassi/application-flags: 32/32] Rename G_MARKUP_PARSE_FLAGS_NONE




commit 8f68c1e6468031d6458ce058c21ace78c9d77a1d
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Jul 25 00:18:23 2022 +0100

    Rename G_MARKUP_PARSE_FLAGS_NONE
    
    The prefix for GMarkupParseFlags enumeration members is G_MARKUP; this
    means that G_MARKUP_PARSE_FLAGS_NONE gets split into
    GLib.MarkupParseFlags.PARSE_FLAGS_NONE by the introspection scanner.
    
    The `/*< nick=none >*/` trigraph attribute is a glib-mkenum thing, and
    does not affect the introspection scanner; it would also only affect the
    GEnumValue nickname, which is not used by language bindings to resolve
    the name of the enumeration member. Plus, GMarkupParseFlags does not
    have a corresponding GType anyway.

 gio/gcontenttype.c            | 3 +--
 glib/gbookmarkfile.c          | 2 +-
 glib/gmarkup.h                | 4 ++--
 glib/tests/autoptr.c          | 2 +-
 glib/tests/markup-collect.c   | 2 +-
 glib/tests/markup-parse.c     | 2 +-
 glib/tests/markup-subparser.c | 3 +--
 glib/tests/markup.c           | 3 +--
 gobject/tests/boxed.c         | 3 +--
 9 files changed, 10 insertions(+), 14 deletions(-)
---
diff --git a/gio/gcontenttype.c b/gio/gcontenttype.c
index a824aa55fb..1e21bbd041 100644
--- a/gio/gcontenttype.c
+++ b/gio/gcontenttype.c
@@ -435,8 +435,7 @@ load_comment_for_mime_helper (const char *dir,
   if (!res)
     return NULL;
 
-  context = g_markup_parse_context_new (&parser, G_MARKUP_PARSE_FLAGS_NONE,
-                                        &parse_data, NULL);
+  context = g_markup_parse_context_new (&parser, G_MARKUP_DEFAULT_FLAGS, &parse_data, NULL);
   res = g_markup_parse_context_parse (context, data, len, NULL);
   g_free (data);
   g_markup_parse_context_free (context);
diff --git a/glib/gbookmarkfile.c b/glib/gbookmarkfile.c
index a45f939b0f..68618fb1c1 100644
--- a/glib/gbookmarkfile.c
+++ b/glib/gbookmarkfile.c
@@ -1510,7 +1510,7 @@ g_bookmark_file_parse (GBookmarkFile  *bookmark,
   parse_data->bookmark_file = bookmark;
 
   context = g_markup_parse_context_new (&markup_parser,
-                                       G_MARKUP_PARSE_FLAGS_NONE,
+                                       G_MARKUP_DEFAULT_FLAGS,
                                        parse_data,
                                        (GDestroyNotify) parse_data_free);
 
diff --git a/glib/gmarkup.h b/glib/gmarkup.h
index 6224d13431..5b5781350d 100644
--- a/glib/gmarkup.h
+++ b/glib/gmarkup.h
@@ -76,7 +76,7 @@ GQuark g_markup_error_quark (void);
 
 /**
  * GMarkupParseFlags:
- * @G_MARKUP_PARSE_FLAGS_NONE: No special behaviour. Since: 2.74
+ * @G_MARKUP_DEFAULT_FLAGS: No special behaviour. Since: 2.74
  * @G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use
  * @G_MARKUP_TREAT_CDATA_AS_TEXT: When this flag is set, CDATA marked
  *     sections are not passed literally to the @passthrough function of
@@ -97,7 +97,7 @@ GQuark g_markup_error_quark (void);
  */
 typedef enum
 {
-  G_MARKUP_PARSE_FLAGS_NONE GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0, /*< nick=none >*/
+  G_MARKUP_DEFAULT_FLAGS GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
   G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 << 0,
   G_MARKUP_TREAT_CDATA_AS_TEXT              = 1 << 1,
   G_MARKUP_PREFIX_ERROR_POSITION            = 1 << 2,
diff --git a/glib/tests/autoptr.c b/glib/tests/autoptr.c
index 07697e3f03..06f1a0bff6 100644
--- a/glib/tests/autoptr.c
+++ b/glib/tests/autoptr.c
@@ -244,7 +244,7 @@ static void
 test_g_markup_parse_context (void)
 {
   g_autoptr(GMarkupParseContext) val = g_markup_parse_context_new (&parser,
-                                                                   G_MARKUP_PARSE_FLAGS_NONE,
+                                                                   G_MARKUP_DEFAULT_FLAGS,
                                                                    NULL, NULL);
   g_assert_nonnull (val);
 }
diff --git a/glib/tests/markup-collect.c b/glib/tests/markup-collect.c
index bc6091d1cc..8afc829d74 100644
--- a/glib/tests/markup-collect.c
+++ b/glib/tests/markup-collect.c
@@ -209,7 +209,7 @@ test_cleanup (void)
     return;
 
   context = g_markup_parse_context_new (&cleanup_parser,
-                                        G_MARKUP_PARSE_FLAGS_NONE, NULL,
+                                        G_MARKUP_DEFAULT_FLAGS, NULL,
                                         NULL);
   g_markup_parse_context_parse (context, XML, -1, NULL);
 
diff --git a/glib/tests/markup-parse.c b/glib/tests/markup-parse.c
index 1945bc39bd..136a9a9617 100644
--- a/glib/tests/markup-parse.c
+++ b/glib/tests/markup-parse.c
@@ -314,7 +314,7 @@ main (int argc, char *argv[])
   if (argc > 1)
     {
       gint arg = 1;
-      GMarkupParseFlags flags = G_MARKUP_PARSE_FLAGS_NONE;
+      GMarkupParseFlags flags = G_MARKUP_DEFAULT_FLAGS;
 
       if (strcmp (argv[1], "--cdata-as-text") == 0)
         {
diff --git a/glib/tests/markup-subparser.c b/glib/tests/markup-subparser.c
index 7d70f8c984..e2e94ea90e 100644
--- a/glib/tests/markup-subparser.c
+++ b/glib/tests/markup-subparser.c
@@ -291,8 +291,7 @@ test (gconstpointer user_data)
 
   error = NULL;
   string = g_string_new (NULL);
-  ctx = g_markup_parse_context_new (&parser, G_MARKUP_PARSE_FLAGS_NONE,
-                                    string, NULL);
+  ctx = g_markup_parse_context_new (&parser, G_MARKUP_DEFAULT_FLAGS, string, NULL);
   result = g_markup_parse_context_parse (ctx, tc->markup,
                                          strlen (tc->markup), &error);
   if (result)
diff --git a/glib/tests/markup.c b/glib/tests/markup.c
index 6fced87d49..f0f3cfe0b2 100644
--- a/glib/tests/markup.c
+++ b/glib/tests/markup.c
@@ -80,8 +80,7 @@ test_markup_stack (void)
   gboolean res;
   GError *error = NULL;
 
-  context = g_markup_parse_context_new (&parser, G_MARKUP_PARSE_FLAGS_NONE,
-                                        &data, NULL);
+  context = g_markup_parse_context_new (&parser, G_MARKUP_DEFAULT_FLAGS, &data, NULL);
   res = g_markup_parse_context_parse (context, content, -1, &error);
   g_assert (res);
   g_assert_no_error (error);
diff --git a/gobject/tests/boxed.c b/gobject/tests/boxed.c
index dd45a80a34..4d3f4ea6ff 100644
--- a/gobject/tests/boxed.c
+++ b/gobject/tests/boxed.c
@@ -560,8 +560,7 @@ test_boxed_markup (void)
   g_value_init (&value, G_TYPE_MARKUP_PARSE_CONTEXT);
   g_assert (G_VALUE_HOLDS_BOXED (&value));
 
-  c = g_markup_parse_context_new (&parser, G_MARKUP_PARSE_FLAGS_NONE,
-                                  NULL, NULL);
+  c = g_markup_parse_context_new (&parser, G_MARKUP_DEFAULT_FLAGS, NULL, NULL);
   g_value_take_boxed (&value, c);
 
   c2 = g_value_get_boxed (&value);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]