summaryrefslogtreecommitdiffstats
path: root/src/sp-object.cpp
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2006-02-06 04:15:05 +0000
committermental <mental@users.sourceforge.net>2006-02-06 04:15:05 +0000
commit4f46bb0e09ddfa540b60bd4d152385729127aceb (patch)
tree7b30dc6f0d64d847c422352d23ef1187ec04802a /src/sp-object.cpp
parentsilence warnings (diff)
downloadinkscape-4f46bb0e09ddfa540b60bd4d152385729127aceb.tar.gz
inkscape-4f46bb0e09ddfa540b60bd4d152385729127aceb.zip
replace Util::SharedCStringPtr with the more general Util::shared_ptr<>
(bzr r87)
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 d23a4d640..d8fe26b87 100644
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
@@ -225,16 +225,16 @@ sp_object_finalize(GObject *object)
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;
}
@@ -250,11 +250,11 @@ public:
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("sp-object-ref");
} else {
- return Inkscape::Util::SharedCStringPtr::coerce("sp-object-unref");
+ return Inkscape::Util::share_static("sp-object-unref");
}
}
unsigned propertyCount() const { return 2; }
@@ -270,7 +270,7 @@ public:
}
private:
- Inkscape::Util::SharedCStringPtr _object;
+ Inkscape::Util::shared_ptr<char> _object;
unsigned _refcount;
Type _type;
};