[librsvg] rsvg_node_chars_new(): Make the caller use rsvg_node_chars_append() for the initial contents
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] rsvg_node_chars_new(): Make the caller use rsvg_node_chars_append() for the initial contents
- Date: Tue, 5 Dec 2017 22:20:03 +0000 (UTC)
commit 1ab84e99917a9bbc765d8257a6321236a9889542
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Dec 5 16:13:31 2017 -0600
rsvg_node_chars_new(): Make the caller use rsvg_node_chars_append() for the initial contents
rsvg-base.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/rsvg-base.c b/rsvg-base.c
index 8383456..86043af 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -924,16 +924,13 @@ rsvg_node_chars_append (RsvgNode *node,
}
static RsvgNode *
-rsvg_new_node_chars (const char *text,
- int len,
- RsvgNode *parent)
+rsvg_new_node_chars (RsvgNode *parent)
{
RsvgNodeChars *self;
RsvgState *state;
RsvgNode *node;
self = g_new0 (RsvgNodeChars, 1);
-
self->contents = g_string_new (NULL);
state = rsvg_state_new ();
@@ -947,8 +944,6 @@ rsvg_new_node_chars (const char *text,
rsvg_node_chars_draw,
rsvg_node_chars_free);
- rsvg_node_chars_append (node, text, len);
-
return node;
}
@@ -996,7 +991,8 @@ rsvg_characters_impl (RsvgHandle * ctx, const xmlChar * ch, gssize len)
}
}
- node = rsvg_new_node_chars ((char *) ch, len, ctx->priv->currentnode);
+ node = rsvg_new_node_chars (ctx->priv->currentnode);
+ rsvg_node_chars_append (node, (const char *) ch, len);
add_node_to_handle (ctx, node);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]