summaryrefslogtreecommitdiffstats
path: root/src/sp-object.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-08-31 18:59:47 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-08-31 18:59:47 +0000
commit6a306cf8edbaebacbe679a58f6b162657caf5ad0 (patch)
treef043ce64170b0ab7ada1712efb8e38a3fbe5681a /src/sp-object.cpp
parentUpdate to experimental r13483 (diff)
parentHeader cleanup: stop using Glib types where they aren't truly needed. Eases G... (diff)
downloadinkscape-6a306cf8edbaebacbe679a58f6b162657caf5ad0.tar.gz
inkscape-6a306cf8edbaebacbe679a58f6b162657caf5ad0.zip
Update to experimental r13531
(bzr r13090.1.106)
Diffstat (limited to 'src/sp-object.cpp')
-rw-r--r--src/sp-object.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index 65228ec0a..fcff43aa5 100644
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
@@ -1406,12 +1406,12 @@ bool SPObject::setDesc(gchar const *desc, bool verbatim)
return setTitleOrDesc(desc, "svg:desc", verbatim);
}
-gchar * SPObject::getTitleOrDesc(gchar const *svg_tagname) const
+char * SPObject::getTitleOrDesc(gchar const *svg_tagname) const
{
- gchar *result = 0;
+ char *result = NULL;
SPObject *elem = findFirstChild(svg_tagname);
if ( elem ) {
- result = g_string_free(elem->textualContent(), FALSE);
+ result = elem->textualContent();
}
return result;
}
@@ -1493,7 +1493,7 @@ SPObject * SPObject::findFirstChild(gchar const *tagname) const
return NULL;
}
-GString * SPObject::textualContent() const
+char* SPObject::textualContent() const
{
GString* text = g_string_new("");
@@ -1502,15 +1502,15 @@ GString * SPObject::textualContent() const
Inkscape::XML::NodeType child_type = child->repr->type();
if (child_type == Inkscape::XML::ELEMENT_NODE) {
- GString * new_text = child->textualContent();
- g_string_append(text, new_text->str);
- g_string_free(new_text, TRUE);
+ char* new_string = child->textualContent();
+ g_string_append(text, new_string);
+ g_free(new_string);
}
else if (child_type == Inkscape::XML::TEXT_NODE) {
g_string_append(text, child->repr->content());
}
}
- return text;
+ return g_string_free(text, FALSE);
}
/*