mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 06:56:14 +01:00
also clear the NOCOPY_CONTENTS flag when replacing NULL with the empty
2007-04-25 Michael Natterer <mitch@imendio.com> * gparamspecs.c (param_string_validate): also clear the NOCOPY_CONTENTS flag when replacing NULL with the empty string. svn path=/trunk/; revision=5458
This commit is contained in:
parent
61fffe9624
commit
a5aebabd2d
@ -7,10 +7,6 @@
|
|||||||
|
|
||||||
2007-04-24 Michael Natterer <mitch@imendio.com>
|
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
|
* tests/gobject/paramspec-test.c: test all GParamSpecString
|
||||||
validations with static and allocated strings.
|
validations with static and allocated strings.
|
||||||
|
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2007-04-25 Michael Natterer <mitch@imendio.com>
|
||||||
|
|
||||||
|
* 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>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
Tue Apr 3 12:34:14 2007 Tim Janik <timj@gtk.org>
|
Tue Apr 3 12:34:14 2007 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gobject.[hc]: invoke GObjectClass.constructed() only for newly
|
* gobject.[hc]: invoke GObjectClass.constructed() only for newly
|
||||||
|
@ -665,6 +665,7 @@ param_string_validate (GParamSpec *pspec,
|
|||||||
}
|
}
|
||||||
if (sspec->ensure_non_null && !string)
|
if (sspec->ensure_non_null && !string)
|
||||||
{
|
{
|
||||||
|
value->data[1].v_uint &= ~G_VALUE_NOCOPY_CONTENTS;
|
||||||
value->data[0].v_pointer = g_strdup ("");
|
value->data[0].v_pointer = g_strdup ("");
|
||||||
changed++;
|
changed++;
|
||||||
string = value->data[0].v_pointer;
|
string = value->data[0].v_pointer;
|
||||||
|
Loading…
Reference in New Issue
Block a user