diff options
author | Christian Persch <chpe@gnome.org> | 2011-11-11 19:24:42 +0100 |
---|---|---|
committer | Christian Persch <chpe@gnome.org> | 2011-11-11 19:24:42 +0100 |
commit | 6e27a58a8da64e97b0254fbe018f3bf7a78a8578 (patch) | |
tree | 53136fcf68c6c9b59725eed4e277bcdd7d2e635a /rsvg-structure.c | |
parent | 593ecfbb18c7923acc7a90a9d560867ab78372a9 (diff) | |
download | librsvg-6e27a58a8da64e97b0254fbe018f3bf7a78a8578.tar.gz |
Avoid unnecessary strdups
In all cases except one, the property bag does not need to store copies
of the attributes and values. So make the property bag store them by
reference, and add rsvg_property_bag_dup for the one case where we do
need to make a bag that owns the attributes and values.
Diffstat (limited to 'rsvg-structure.c')
-rw-r--r-- | rsvg-structure.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rsvg-structure.c b/rsvg-structure.c index 29451da7..1370dbc9 100644 --- a/rsvg-structure.c +++ b/rsvg-structure.c @@ -359,7 +359,7 @@ rsvg_node_svg_set_atts (RsvgNode * self, RsvgHandle * ctx, RsvgPropertyBag * att * style element is not loaded yet here, so we need to store those attribues * to be applied later. */ - svg->atts = rsvg_property_bag_ref(atts); + svg->atts = rsvg_property_bag_dup(atts); } } |