diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index d23a4d640cb9a8319e54d56853f92ea36b70f1cb..f97007b5140afeea94db994886676cdeb766777b 100644 (file)
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
namespace {
-Inkscape::Util::SharedCStringPtr stringify(SPObject *obj) {
+Inkscape::Util::shared_ptr<char> stringify(SPObject *obj) {
char *temp=g_strdup_printf("%p", obj);
- Inkscape::Util::SharedCStringPtr result=Inkscape::Util::SharedCStringPtr::copy(temp);
+ Inkscape::Util::shared_ptr<char> result=Inkscape::Util::share_string(temp);
g_free(temp);
return result;
}
-Inkscape::Util::SharedCStringPtr stringify(unsigned n) {
+Inkscape::Util::shared_ptr<char> stringify(unsigned n) {
char *temp=g_strdup_printf("%u", n);
- Inkscape::Util::SharedCStringPtr result=Inkscape::Util::SharedCStringPtr::copy(temp);
+ Inkscape::Util::shared_ptr<char> result=Inkscape::Util::share_string(temp);
g_free(temp);
return result;
}
static Category category() { return REFCOUNT; }
- Inkscape::Util::SharedCStringPtr name() const {
+ Inkscape::Util::shared_ptr<char> name() const {
if ( _type == REF) {
- return Inkscape::Util::SharedCStringPtr::coerce("sp-object-ref");
+ return Inkscape::Util::share_static_string("sp-object-ref");
} else {
- return Inkscape::Util::SharedCStringPtr::coerce("sp-object-unref");
+ return Inkscape::Util::share_static_string("sp-object-unref");
}
}
unsigned propertyCount() const { return 2; }
}
private:
- Inkscape::Util::SharedCStringPtr _object;
+ Inkscape::Util::shared_ptr<char> _object;
unsigned _refcount;
Type _type;
};