[glib/gsettings] rename some functions for bindability
- From: Ryan Lortie <ryanl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glib/gsettings] rename some functions for bindability
- Date: Mon, 14 Sep 2009 17:44:04 +0000 (UTC)
commit af4da4dbab0617fbb70da6e1cca0d916f6a159b1
Author: Ryan Lortie <desrt desrt ca>
Date: Mon Sep 14 13:15:23 2009 -0400
rename some functions for bindability
docs/reference/glib/glib-sections.txt | 4 ++++
gio/gsettings-update-schema-cache.c | 2 +-
glib/glib.symbols | 4 ++--
glib/gvariant-core.c | 12 +++++++-----
glib/gvariant-parser.c | 16 ++++++++--------
glib/gvariant.h | 8 ++++----
6 files changed, 26 insertions(+), 20 deletions(-)
---
diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt
index bd0ee4a..c47933a 100644
--- a/docs/reference/glib/glib-sections.txt
+++ b/docs/reference/glib/glib-sections.txt
@@ -2831,6 +2831,10 @@ g_variant_format_string_scan
<SUBSECTION>
g_variant_print
g_variant_print_string
+g_variant_parse
+g_variant_parse_full
+g_variant_new_parsed
+g_variant_new_parsed_va
<SUBSECTION>
GVariantIter
diff --git a/gio/gsettings-update-schema-cache.c b/gio/gsettings-update-schema-cache.c
index a34ba85..984ed81 100644
--- a/gio/gsettings-update-schema-cache.c
+++ b/gio/gsettings-update-schema-cache.c
@@ -708,7 +708,7 @@ serialise_schema (Schema *schema)
GVariant *entry;
g_assert (g_hash_table_size (schema->keys) == 0);
- entry = g_variant_parsef ("{'list', ('as', <@as []>)}");
+ entry = g_variant_new_parsed ("{'list', ('as', <@as []>)}");
g_variant_builder_add_value (keys, entry);
g_variant_builder_add (parents, "s", "list");
}
diff --git a/glib/glib.symbols b/glib/glib.symbols
index 55bc9f6..3b3caf6 100644
--- a/glib/glib.symbols
+++ b/glib/glib.symbols
@@ -1716,9 +1716,9 @@ g_variant_lookup_value
#if IN_FILE(__G_VARIANT_PARSER_C__)
g_variant_parse
-g_variant_parsef
-g_variant_parsef_va
g_variant_parse_full
+g_variant_new_parsed
+g_variant_new_parsed_va
#endif
#if IN_FILE(__G_VARIANT_PRINTER_C__)
diff --git a/glib/gvariant-core.c b/glib/gvariant-core.c
index 7b8d4a7..2e6c82e 100644
--- a/glib/gvariant-core.c
+++ b/glib/gvariant-core.c
@@ -1354,6 +1354,7 @@ g_variant_from_slice (const GVariantType *type,
new->contents.serialised.source = NULL;
new->contents.serialised.data = slice;
+ new->floating = FALSE;
new->size = size;
return g_variant_apply_flags (new, flags);
@@ -1383,11 +1384,11 @@ g_variant_from_slice (const GVariantType *type,
**/
GVariant *
g_variant_from_data (const GVariantType *type,
- gconstpointer data,
- gsize size,
- GVariantFlags flags,
- GDestroyNotify notify,
- gpointer user_data)
+ gconstpointer data,
+ gsize size,
+ GVariantFlags flags,
+ GDestroyNotify notify,
+ gpointer user_data)
{
GVariant *new;
@@ -1416,6 +1417,7 @@ g_variant_from_data (const GVariantType *type,
CONDITION_SERIALISED | CONDITION_SIZE_KNOWN);
new->contents.serialised.source = marker;
new->contents.serialised.data = (gpointer) data;
+ new->floating = FALSE;
new->size = size;
return g_variant_apply_flags (new, flags);
diff --git a/glib/gvariant-parser.c b/glib/gvariant-parser.c
index fb14e37..f4a0331 100644
--- a/glib/gvariant-parser.c
+++ b/glib/gvariant-parser.c
@@ -2033,7 +2033,7 @@ parse (TokenStream *stream,
* @endptr: a location to store the end pointer, or %NULL
* @type: a #GVariantType, or %NULL
* @error: an #GVariantParseError, or %NULL
- * @Returns: a floating #GVariant, or %NULL
+ * @Returns: a reference to a #GVariant, or %NULL
*
* Parses a #GVariant from a text representation. This is the
* generalised form of g_variant_parse(). See that call for a simpler
@@ -2119,8 +2119,8 @@ g_variant_parse_full (const gchar *text,
}
GVariant *
-g_variant_parsef_va (const gchar *format,
- va_list *app)
+g_variant_new_parsed_va (const gchar *format,
+ va_list *app)
{
TokenStream stream = { };
GVariant *result = NULL;
@@ -2144,11 +2144,11 @@ g_variant_parsef_va (const gchar *format,
stream.stream++;
if (*stream.stream)
- g_critical ("g_variant_parsef: trailing text after value");
+ g_critical ("g_variant_new_parsed: trailing text after value");
}
else
{
- g_critical ("g_variant_parsef: %s", stream.error.error);
+ g_critical ("g_variant_new_parsed: %s", stream.error.error);
g_free (stream.error.error);
}
@@ -2156,14 +2156,14 @@ g_variant_parsef_va (const gchar *format,
}
GVariant *
-g_variant_parsef (const gchar *format,
- ...)
+g_variant_new_parsed (const gchar *format,
+ ...)
{
GVariant *result;
va_list ap;
va_start (ap, format);
- result = g_variant_parsef_va (format, &ap);
+ result = g_variant_new_parsed_va (format, &ap);
va_end (ap);
return result;
diff --git a/glib/gvariant.h b/glib/gvariant.h
index 8574b56..01f3cca 100644
--- a/glib/gvariant.h
+++ b/glib/gvariant.h
@@ -190,15 +190,15 @@ GVariant * g_variant_parse (const g
gint text_length,
const GVariantType *type,
GError **error);
-GVariant * g_variant_parsef (const gchar *format,
- ...);
-GVariant * g_variant_parsef_va (const gchar *format,
- va_list *app);
GVariant * g_variant_parse_full (const gchar *text,
const gchar *limit,
const gchar **endptr,
const GVariantType *type,
GVariantParseError *error);
+GVariant * g_variant_new_parsed (const gchar *format,
+ ...);
+GVariant * g_variant_new_parsed_va (const gchar *format,
+ va_list *app);
/* markup printing/parsing */
gchar * g_variant_markup_print (GVariant *value,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]