summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2018-08-13 14:00:23 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2018-08-13 14:00:23 +0000
commit923096aac41199d8e6ec1bc3df211d36ab1607a1 (patch)
tree256fb62296a199d43d5b16f23d094898342e9d9d
parentda6fdbfc3962fd04cf0cbd20e2b60c56d8f69f36 (diff)
parent8578acafd519448f38601026a58dbfdbeb03a72f (diff)
downloaddconf-923096aac41199d8e6ec1bc3df211d36ab1607a1.tar.gz
Merge branch 'gvdb-update' into 'master'
Update GVDB from gvdb/master See merge request GNOME/dconf!17
-rw-r--r--gvdb/README11
-rw-r--r--gvdb/gvdb-builder.c5
-rw-r--r--gvdb/gvdb-builder.h2
-rw-r--r--gvdb/gvdb-format.h2
-rw-r--r--gvdb/gvdb-reader.c35
-rw-r--r--gvdb/gvdb-reader.h2
-rw-r--r--gvdb/gvdb.doap31
7 files changed, 67 insertions, 21 deletions
diff --git a/gvdb/README b/gvdb/README
index 94e6c5d..4dbd697 100644
--- a/gvdb/README
+++ b/gvdb/README
@@ -1,7 +1,12 @@
DO NOT MODIFY ANY FILE IN THIS DIRECTORY
-(except maybe the Makefile.am)
+(except maybe the meson.build)
This directory is the result of a git subtree merge with the 'gvdb'
-module on git.gnome.org. Please apply fixes to the 'gvdb' module and
-perform a git merge.
+module on gitlab.gnome.org. Please apply fixes to the 'gvdb' module and
+perform a git merge:
+
+git remote add gvdb git@gitlab.gnome.org:GNOME/gvdb.git
+git remote update gvdb
+cd gvdb/
+git merge gvdb/master \ No newline at end of file
diff --git a/gvdb/gvdb-builder.c b/gvdb/gvdb-builder.c
index 90ea50b..2383e60 100644
--- a/gvdb/gvdb-builder.c
+++ b/gvdb/gvdb-builder.c
@@ -4,7 +4,7 @@
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
- * version 2 of the licence, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -291,7 +291,8 @@ file_builder_add_string (FileBuilder *fb,
chunk->offset = fb->offset;
chunk->size = length;
chunk->data = g_malloc (length);
- memcpy (chunk->data, string, length);
+ if (length != 0)
+ memcpy (chunk->data, string, length);
*start = guint32_to_le (fb->offset);
*size = guint16_to_le (length);
diff --git a/gvdb/gvdb-builder.h b/gvdb/gvdb-builder.h
index 8ec05c8..b4815f0 100644
--- a/gvdb/gvdb-builder.h
+++ b/gvdb/gvdb-builder.h
@@ -4,7 +4,7 @@
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
- * version 2 of the licence, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/gvdb/gvdb-format.h b/gvdb/gvdb-format.h
index 486e854..ed6adab 100644
--- a/gvdb/gvdb-format.h
+++ b/gvdb/gvdb-format.h
@@ -4,7 +4,7 @@
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
- * version 2 of the licence, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/gvdb/gvdb-reader.c b/gvdb/gvdb-reader.c
index 08b5bc8..aa3154f 100644
--- a/gvdb/gvdb-reader.c
+++ b/gvdb/gvdb-reader.c
@@ -4,7 +4,7 @@
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
- * version 2 of the licence, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -125,14 +125,16 @@ gvdb_table_setup_root (GvdbTable *file,
* @bytes: the #GBytes with the data
* @trusted: if the contents of @bytes are trusted
* @error: %NULL, or a pointer to a %NULL #GError
- * @returns: a new #GvdbTable
*
* Creates a new #GvdbTable from the contents of @bytes.
*
- * This call can fail if the header contained in @bytes is invalid.
+ * This call can fail if the header contained in @bytes is invalid or if @bytes
+ * is empty; if so, %G_FILE_ERROR_INVAL will be returned.
*
* You should call gvdb_table_free() on the return result when you no
* longer require it.
+ *
+ * Returns: a new #GvdbTable
**/
GvdbTable *
gvdb_table_new_from_bytes (GBytes *bytes,
@@ -184,10 +186,17 @@ invalid:
* @filename: a filename
* @trusted: if the contents of @bytes are trusted
* @error: %NULL, or a pointer to a %NULL #GError
- * @returns: a new #GvdbTable
*
* Creates a new #GvdbTable using the #GMappedFile for @filename as the
* #GBytes.
+ *
+ * This function will fail if the file cannot be opened.
+ * In that case, the #GError that is returned will be an error from
+ * g_mapped_file_new().
+ *
+ * An empty or corrupt file will result in %G_FILE_ERROR_INVAL.
+ *
+ * Returns: a new #GvdbTable
**/
GvdbTable *
gvdb_table_new (const gchar *filename,
@@ -474,7 +483,6 @@ gvdb_table_get_names (GvdbTable *table,
* gvdb_table_list:
* @file: a #GvdbTable
* @key: a string
- * @returns: a %NULL-terminated string array
*
* List all of the keys that appear below @key. The nesting of keys
* within the hash file is defined by the program that created the hash
@@ -487,6 +495,8 @@ gvdb_table_get_names (GvdbTable *table,
*
* You should call g_strfreev() on the return result when you no longer
* require it.
+ *
+ * Returns: a %NULL-terminated string array
**/
gchar **
gvdb_table_list (GvdbTable *file,
@@ -537,12 +547,13 @@ gvdb_table_list (GvdbTable *file,
* gvdb_table_has_value:
* @file: a #GvdbTable
* @key: a string
- * @returns: %TRUE if @key is in the table
*
* Checks for a value named @key in @file.
*
* Note: this function does not consider non-value nodes (other hash
* tables, for example).
+ *
+ * Returns: %TRUE if @key is in the table
**/
gboolean
gvdb_table_has_value (GvdbTable *file,
@@ -586,7 +597,6 @@ gvdb_table_value_from_item (GvdbTable *table,
* gvdb_table_get_value:
* @file: a #GvdbTable
* @key: a string
- * @returns: a #GVariant, or %NULL
*
* Looks up a value named @key in @file.
*
@@ -596,6 +606,8 @@ gvdb_table_value_from_item (GvdbTable *table,
*
* You should call g_variant_unref() on the return result when you no
* longer require it.
+ *
+ * Returns: a #GVariant, or %NULL
**/
GVariant *
gvdb_table_get_value (GvdbTable *file,
@@ -625,12 +637,13 @@ gvdb_table_get_value (GvdbTable *file,
* gvdb_table_get_raw_value:
* @table: a #GvdbTable
* @key: a string
- * @returns: a #GVariant, or %NULL
*
* Looks up a value named @key in @file.
*
* This call is equivalent to gvdb_table_get_value() except that it
* never byteswaps the value.
+ *
+ * Returns: a #GVariant, or %NULL
**/
GVariant *
gvdb_table_get_raw_value (GvdbTable *table,
@@ -648,7 +661,6 @@ gvdb_table_get_raw_value (GvdbTable *table,
* gvdb_table_get_table:
* @file: a #GvdbTable
* @key: a string
- * @returns: a new #GvdbTable, or %NULL
*
* Looks up the hash table named @key in @file.
*
@@ -662,6 +674,8 @@ gvdb_table_get_raw_value (GvdbTable *table,
*
* You should call gvdb_table_free() on the return result when you no
* longer require it.
+ *
+ * Returns: a new #GvdbTable, or %NULL
**/
GvdbTable *
gvdb_table_get_table (GvdbTable *file,
@@ -703,13 +717,14 @@ gvdb_table_free (GvdbTable *file)
/**
* gvdb_table_is_valid:
* @table: a #GvdbTable
- * @returns: %TRUE if @table is still valid
*
* Checks if the table is still valid.
*
* An on-disk GVDB can be marked as invalid. This happens when the file
* has been replaced. The appropriate action is typically to reopen the
* file.
+ *
+ * Returns: %TRUE if @table is still valid
**/
gboolean
gvdb_table_is_valid (GvdbTable *table)
diff --git a/gvdb/gvdb-reader.h b/gvdb/gvdb-reader.h
index 241b41a..3982773 100644
--- a/gvdb/gvdb-reader.h
+++ b/gvdb/gvdb-reader.h
@@ -4,7 +4,7 @@
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
- * version 2 of the licence, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/gvdb/gvdb.doap b/gvdb/gvdb.doap
index b4ae60c..8c5f3e8 100644
--- a/gvdb/gvdb.doap
+++ b/gvdb/gvdb.doap
@@ -23,9 +23,34 @@
<maintainer>
<foaf:Person>
- <foaf:name>Ryan Lortie</foaf:name>
- <foaf:mbox rdf:resource='mailto:desrt@desrt.ca'/>
- <gnome:userid>ryanl</gnome:userid>
+ <foaf:name>Matthias Clasen</foaf:name>
+ <foaf:mbox rdf:resource="mailto:mclasen@redhat.com"/>
+ <gnome:userid>matthiasc</gnome:userid>
+ </foaf:Person>
+ </maintainer>
+
+ <maintainer>
+ <foaf:Person>
+ <foaf:name>Allison Ryan Lortie</foaf:name>
+ <foaf:mbox rdf:resource="mailto:desrt@desrt.ca"/>
+ <gnome:userid>desrt</gnome:userid>
+ </foaf:Person>
+ </maintainer>
+
+ <maintainer>
+ <foaf:Person>
+ <foaf:name>Philip Withnall</foaf:name>
+ <foaf:mbox rdf:resource="mailto:philip@tecnocode.co.uk"/>
+ <foaf:mbox rdf:resource="mailto:withnall@endlessm.com"/>
+ <gnome:userid>pwithnall</gnome:userid>
+ </foaf:Person>
+ </maintainer>
+
+ <maintainer>
+ <foaf:Person>
+ <foaf:name>Emmanuele Bassi</foaf:name>
+ <foaf:mbox rdf:resource="mailto:ebassi@gnome.org"/>
+ <gnome:userid>ebassi</gnome:userid>
</foaf:Person>
</maintainer>