use g_slice_dup() instead of copying the struct contents manually.

2008-03-10  Michael Natterer  <mitch@gimp.org>

	* app/vectors/gimpanchor.c (gimp_anchor_copy): use g_slice_dup()
	instead of copying the struct contents manually.


svn path=/trunk/; revision=25080
This commit is contained in:
Michael Natterer 2008-03-10 14:25:47 +00:00 committed by Michael Natterer
parent a58fccea90
commit cffce40876
2 changed files with 6 additions and 7 deletions

View file

@ -1,3 +1,8 @@
2008-03-10 Michael Natterer <mitch@gimp.org>
* app/vectors/gimpanchor.c (gimp_anchor_copy): use g_slice_dup()
instead of copying the struct contents manually.
2008-03-09 Michael Natterer <mitch@gimp.org>
Fix mishandling of the "antialias" GParamSpec. Fixes bug #521069:

View file

@ -58,15 +58,9 @@ gimp_anchor_new (GimpAnchorType type,
GimpAnchor *
gimp_anchor_copy (const GimpAnchor *anchor)
{
GimpAnchor *new;
g_return_val_if_fail (anchor != NULL, NULL);
new = g_slice_new (GimpAnchor);
*new = *anchor;
return new;
return g_slice_dup (GimpAnchor, anchor);
}
void