diff options
author | Michael Natterer <mitch@imendio.com> | 2007-04-25 08:57:34 +0000 |
---|---|---|
committer | Michael Natterer <mitch@src.gnome.org> | 2007-04-25 08:57:34 +0000 |
commit | 7c5686cababd1d573c27939e4895ab0ed8757970 (patch) | |
tree | 341e88800bedee913a6ee344aac9b9d7ef089bea | |
parent | 0c2ffdd3c5c055c9fdd2f2c397a7d0a882fc2bab (diff) | |
download | glib-7c5686cababd1d573c27939e4895ab0ed8757970.tar.gz |
Merge from trunk:
2007-04-25 Michael Natterer <mitch@imendio.com>
Merge from trunk:
* gparamspecs.c (param_string_validate): also clear the
NOCOPY_CONTENTS flag when replacing NULL with the empty string.
svn path=/branches/glib-2-12/; revision=5459
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | gobject/ChangeLog | 15 | ||||
-rw-r--r-- | gobject/gparamspecs.c | 3 |
3 files changed, 17 insertions, 5 deletions
@@ -2,10 +2,6 @@ Merge from trunk: - * 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. diff --git a/gobject/ChangeLog b/gobject/ChangeLog index 617d959b1..2fb23557c 100644 --- a/gobject/ChangeLog +++ b/gobject/ChangeLog @@ -1,3 +1,18 @@ +2007-04-25 Michael Natterer <mitch@imendio.com> + + Merge from trunk: + + * gparamspecs.c (param_string_validate): also clear the + NOCOPY_CONTENTS flag when replacing NULL with the empty string. + +2007-04-24 Michael Natterer <mitch@imendio.com> + + Merge from trunk: + + * 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. + 2007-03-08 Matthias Clasen <mclasen@redhat.com> * === Released 2.12.11 === diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c index ea502b3d3..5ba897711 100644 --- a/gobject/gparamspecs.c +++ b/gobject/gparamspecs.c @@ -665,11 +665,12 @@ param_string_validate (GParamSpec *pspec, } if (sspec->ensure_non_null && !string) { + value->data[1].v_uint &= ~G_VALUE_NOCOPY_CONTENTS; value->data[0].v_pointer = g_strdup (""); changed++; string = value->data[0].v_pointer; } - + return changed; } |