The existing implementation was completely incorrect (despite the fix in
commit 566e64a66) — it always compared GVariants by pointer, rather than
by value.
Reimplement it to compare them by value where possible, depending on
their type. The core of this implementation is g_variant_compare(). See
the documentation and tests for further details of the new sort order.
This adds documentation and tests.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://bugzilla.gnome.org/show_bug.cgi?id=795735
gen-casefold-txt.pl and gen-casemap-txt.pl are licensed under GPLv2+, so
they are not touched by this commit.
A lot of *.c files in tests/ don't have a license header.
https://bugzilla.gnome.org/show_bug.cgi?id=776504
Very many testcases, some GLib tools (resource compiler, etc) and
GApplication were calling g_type_init().
Remove those uses, as they are no longer required.
https://bugzilla.gnome.org/show_bug.cgi?id=686161
The documentation for G_TYPE_CHAR says:
"The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed
integer."
However the return value for g_value_get_char() was just "char" which
in C has an unspecified signedness; on e.g. x86 it's signed (which
matches the GType), but on e.g. PowerPC or ARM, it's not.
We can't break the old API, so we need to suck it up and add new API.
Port most internal users, but keep some tests of the old API too.
https://bugzilla.gnome.org/show_bug.cgi?id=659870
2008-02-10 Matthias Clasen <mclasen@redhat.com>
* glib/gtestutils.h: Make the g_test_add macro work with
gcc 4.3
* tests/gobject/paramspec-test.c: Adapt to recent changes in
GParamGType initialization.
svn path=/trunk/; revision=6500
2007-04-24 Michael Natterer <mitch@imendio.com>
* gobject/gparamspecs.c (param_string_validate): don't free or
modify static strings, dup them when needed and clear the
G_VALUE_NOCOPY_CONTENTS flag. Fixes bug #432895.
* tests/gobject/paramspec-test.c: test all GParamSpecString
validations with static and allocated strings.
svn path=/trunk/; revision=5454