Commit Graph

13 Commits

Author SHA1 Message Date
Murray Cumming
3ac7e0a7fe Docs: Change DBus to D-Bus 2011-04-04 09:22:06 +02:00
Ryan Lortie
11f06115a4 Bug 629709 - Empty variants
Fix some GVariant bugs uncovered by calling g_variant_new_from_data with
invalid data (which it should be immune to).
2010-09-15 11:21:44 -04:00
Ryan Lortie
2e53e50244 glib/: fully remove galias hacks 2010-07-07 19:34:35 -04:00
Ryan Lortie
4275c68c30 GVariant serialiser: fix small type error 2010-06-16 18:22:48 -04:00
Ryan Lortie
e7927faf17 GVariant: One more FreeBSD fix
FreeBSD's malloc() sometimes returns unaligned memory if you are
requesting small sizes.  This can get GVariant into trouble.  For
example, consider the type "mmi" containing the value "just nothing".
According to the type signature, the memory containing this should be
aligned to a boundary of 4 since it might contain an int.  The
serialised size of this value is 1 byte, however, and when you ask
FreeBSD to allocate memory of that size, it knows you can't put an int
into it so it doesn't bother aligning it.

This patch modifies the GVariant serialiser to not assert the alignment
constraint in the case that the size of the serialised data is smaller
than its own alignment requirement.
2010-05-27 11:32:34 -04:00
Ryan Lortie
a81c2f2c7a GVariant: deal with non-8-aligned malloc()
Closes bug #619585.
2010-05-25 11:26:18 -04:00
Ryan Lortie
9eeab5868f GVariant: strings are now utf8
- modify serialiser validation function to enforce utf8 encoding
 - add documentation to g_variant_new_string(), g_variant_get_string(),
   g_variant_dup_string()
 - add 2 new test cases to check that it works
2010-04-25 13:39:20 -05:00
Tor Lillqvist
2ab76c5b36 Make the GVariant code compile with a non-gcc compiler
In particular, tested with Microsoft Visual C 2008.
2010-03-21 11:22:06 +02:00
Ryan Lortie
a85b9c4bad 'default: g_assert_not_reached();' to silence GCC
Closes bug #612327 reported by Claudio Saavedra.
2010-03-09 13:34:00 -05:00
Ryan Lortie
75f761bcaa GVariant variable arguments, tests, cleanups
Merge GVariant variable arguments support and put it under tests.

Also, remove the hack of the test case directly '#include'ing .c files
from glib/.  Instead, create a non-installed gvariant-internal.h that
the tests can include and make the symbols in it visible on the symbol
table of the shared library.  These symbols (as they are present in no
installed header files) are not part of the API of GLib.

Increase test coverage in a few other areas.
2010-03-08 10:31:19 -05:00
Ryan Lortie
b899bfc741 GVariant: create child instance from its own data
also: white-space fix in the serialiser
2010-02-15 19:38:00 -05:00
Ryan Lortie
e04c9c699c add missing #include "config.h" 2010-02-07 15:43:06 -05:00
Ryan Lortie
80538aba7e merge the GVariant serialiser 2010-02-06 10:26:02 -05:00