Commit Graph

17 Commits

Author SHA1 Message Date
Ting-Wei Lan
e1bcd7529e build: Use weak bindings in gvdb to fix linking with LLD
Since tests/dconf-mock-gvdb.c has functions conflicting with the real
gvdb and it is intended for the former to override the latter in tests,
we have to make functions in gvdb library have weak bindings instead of
the default strong bindings to avoid duplicate symbol errors.

Fixes https://gitlab.gnome.org/GNOME/dconf/issues/47
2018-11-22 00:38:09 +08:00
Philip Withnall
a44329c244 Fix type of length returned by gvdb_table_get_names()
It should not be unsigned. The type in the on-disk format is gint32, so
we need to return something at least as wide as that. However, we
should not expose the implementation detail that the on-disk format is
specifically gint32. Use a gsize, since that’s the normal type for array
lengths — but check that we’re not on a platform where (somehow) gsize
is smaller than gint32.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-16 15:36:32 +01:00
Philip Withnall
c78664e101 Update FSF’s address
(This is based on commit 892fc2e4 from dconf.)

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-13 14:34:19 +01:00
Sébastien Wilmet
4763db8a4c gio/gvdb/: LGPLv2+ -> LGPLv2.1+
https://bugzilla.gnome.org/show_bug.cgi?id=776504
2018-08-13 14:34:19 +01:00
Ryan Lortie
2600082151 reader: embrace GBytes
Drop gvdb_table_new_from_data() and add gvdb_table_new_from_bytes().

Since the underlying backingstore of a GvdbTable is now always
refcounted, drop the refcounting on GvdbTable itself.
2012-11-09 13:19:13 -05:00
Ryan Lortie
fc37611a97 gvdb-reader: drop gvdb_table_walk()
The attempt at the simple method for preventing unbounded recursion
proved to be insufficient due to the existence of dconf databases in the
wild that violated the rule (leading to the entire content of the
database being scrapped).  It also still had the ugly assert for less
than 64 levels of recursion that could have been hit by a determined
advisary.

gvdb_table_get_names() allows the dconf-service to do everything it
needs without the troubles associated with the walk approach.
2012-07-09 15:28:17 -04:00
Ryan Lortie
d9577f100b gvdb-reader.c: add gvdb_table_get_names()
This function lists off all names that appear within a particular hash.
2012-07-09 14:32:22 -04:00
Ryan Lortie
a9551ccf92 more whitespace fixes 2012-07-05 23:14:55 -04:00
Alexander Larsson
73acf01618 Support creating a GvdbReader from data
This is needed for the glib resource work.
2012-01-13 15:59:56 +01:00
Ryan Lortie
03b6b9fb97 Mark a symbol as G_GNUC_INTERNAL 2011-01-25 18:26:21 -05:00
Ryan Lortie
ba5619ba7f C++ify the reader header 2011-01-17 15:15:46 -05:00
Ryan Lortie
814c0fcaaf Pass name_length to walk close function
For efficiency and safety.  This way we don't need to scan backwards for
the path separator (trusting that we will find it properly).
2010-12-07 01:36:09 -05:00
Ryan Lortie
e5e491c969 Add gvdb_table_get_raw_value() API for GSettings 2010-10-03 23:02:45 -04:00
Ryan Lortie
df40747190 Add gvdb_table_is_valid() API
Checks that the on-disk file is still valid.
2010-07-18 20:45:37 -04:00
Ryan Lortie
9a8cba9eb5 drop "options" support 2010-06-10 13:34:56 -04:00
Ryan Lortie
5215d4b6d3 Add API for dconf's sake. 2010-04-28 12:39:02 -05:00
Ryan Lortie
0fec2048f0 Initial commit 2010-04-15 21:26:34 -04:00