Code

share_static -> share_static_string
authormental <mental@users.sourceforge.net>
Wed, 8 Feb 2006 04:15:29 +0000 (04:15 +0000)
committermental <mental@users.sourceforge.net>
Wed, 8 Feb 2006 04:15:29 +0000 (04:15 +0000)
ChangeLog
src/debug/gc-heap.h
src/debug/logger.cpp
src/debug/sysv-heap.h
src/jabber_whiteboard/deserializer.cpp
src/sp-object.cpp
src/util/share.h
src/xml/simple-node.cpp

index 95281eb66d795586e3ffc5987a558611c63b2bc2..3b8ff6a85e337457c92538d2c77100c7c40a6d5d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-02-07  MenTaLguY  <mental@rydia.net>
+
+    * src/debug/gc-heap.h, src/debug/logger.cpp, src/debug/sysv-heap.h,
+      src/jabber_whiteboard/deserializer.cpp, src/sp-object.cpp,
+      src/util/share.h, src/xml/simple-node.cpp:
+
+      share_static -> share_static_string
+
 2006-02-07  Michael Wybrow  <mjwybrow@users.sourceforge.net>
 
        * src/jabber_whiteboard/message-utilities.h,
index 0a9534701deb01272f99b72eb7098feb5b5d2169..75a60158ee3f066232152280c68ede961c06fd0f 100644 (file)
@@ -24,7 +24,7 @@ public:
         return SIZE_AVAILABLE | USED_AVAILABLE | GARBAGE_COLLECTED;
     }
     Util::shared_ptr<char> name() const {
-        return Util::share_static("libgc");
+        return Util::share_static_string("libgc");
     }
     Heap::Stats stats() const {
         Stats stats;
index 6fb1aee05e685bb661b590e29acf26c25be4eff5..3acd95ff523e6a78588d3bb1a9293b3a619e38d0 100644 (file)
@@ -128,7 +128,7 @@ void Logger::init() {
                 log_stream << "<?xml version=\"1.0\"?>\n";
                 log_stream.flush();
                 _enabled = true;
-                start<SimpleEvent<Event::CORE> >(Util::share_static("session"));
+                start<SimpleEvent<Event::CORE> >(Util::share_static_string("session"));
                 std::atexit(&do_shutdown);
             }
         }
index 9a07a3261ea452d22bf83cc7c2cd8ad1c112a134..840afac3261b687b7f2c40a2103f895027f6d5e9 100644 (file)
@@ -24,7 +24,7 @@ public:
     int features() const;
 
     Util::shared_ptr<char> name() const {
-        return Util::share_static("standard malloc()");
+        return Util::share_static_string("standard malloc()");
     }
     Stats stats() const;
     void force_collect() {}
index 066557ad55b22f05fe73a95867da97650a6dfdcf..2df35e8abf2115a3eb127c9af449b445b4e9897d 100644 (file)
@@ -299,14 +299,14 @@ Deserializer::deserializeEventChgContent(Glib::ustring const& msg)
        if (MessageUtilities::findTag(buf, msg)) {
                oldval = Util::share_string(buf.data.c_str());
        } else {
-               oldval = Util::share_static("");
+               oldval = Util::share_static_string("");
        }
 
        buf.tag = MESSAGE_NEWVAL;
        if (MessageUtilities::findTag(buf, msg)) {
                newval = Util::share_string(buf.data.c_str());
        } else {
-               newval = Util::share_static("");
+               newval = Util::share_static_string("");
        }
 
        // 3.  Find the node identified by the ID.  If we cannot find it, return.
@@ -348,7 +348,7 @@ Deserializer::deserializeEventChgAttr(Glib::ustring const& msg)
        if (MessageUtilities::findTag(buf, msg)) {
                newval = Util::share_string(buf.data.c_str());
        } else {
-               newval = Util::share_static("");
+               newval = Util::share_static_string("");
        }
 
        // 3.  Extract optional attributes: old value.  If we do not find it in the message,
@@ -358,7 +358,7 @@ Deserializer::deserializeEventChgAttr(Glib::ustring const& msg)
        if (MessageUtilities::findTag(buf, msg)) {
                oldval = Util::share_string(buf.data.c_str());
        } else {
-               oldval = Util::share_static("");
+               oldval = Util::share_static_string("");
        }
 
        // 4.  Look up this node in the local node database and external tracker.
index d8fe26b8746759c19580fac244cdbe94f38bae39..f97007b5140afeea94db994886676cdeb766777b 100644 (file)
@@ -252,9 +252,9 @@ public:
 
     Inkscape::Util::shared_ptr<char> name() const {
         if ( _type == REF) {
-            return Inkscape::Util::share_static("sp-object-ref");
+            return Inkscape::Util::share_static_string("sp-object-ref");
         } else {
-            return Inkscape::Util::share_static("sp-object-unref");
+            return Inkscape::Util::share_static_string("sp-object-unref");
         }
     }
     unsigned propertyCount() const { return 2; }
index e9e6c5eb0cdd5e54f56e951c76cd2b8de9997732..93cef7a028598a910330694651b0a3be95a35cf7 100644 (file)
@@ -113,9 +113,8 @@ inline shared_ptr<T> share_unsafe(T const *obj) {
     return shared_ptr<T>::share_unsafe(obj);
 }
 
-template <typename T>
-inline shared_ptr<T> share_static(T const *obj) {
-    return shared_ptr<T>::share_unsafe(obj);
+inline shared_ptr<char> share_static_string(char const *string) {
+    return share_unsafe(string);
 }
 
 template <typename T1, typename T2>
index 5e21f941ee9ec40270ae561587b23dabc5a41bf6..fa626a3f2d19e5e640e46da86fec7f85d9854268 100644 (file)
@@ -76,7 +76,7 @@ public:
     static Category category() { return XML; }
 
     Util::shared_ptr<char> name() const {
-        return Util::share_static("add-child");
+        return Util::share_static_string("add-child");
     }
     unsigned propertyCount() const { return 3; }
     PropertyPair property(unsigned i) const {
@@ -107,7 +107,7 @@ public:
     static Category category() { return XML; }
 
     Util::shared_ptr<char> name() const {
-        return Util::share_static("remove-child");
+        return Util::share_static_string("remove-child");
     }
     unsigned propertyCount() const { return 2; }
     PropertyPair property(unsigned i) const {
@@ -141,7 +141,7 @@ public:
     static Category category() { return XML; }
 
     Util::shared_ptr<char> name() const {
-        return Util::share_static("set-child-position");
+        return Util::share_static_string("set-child-position");
     }
     unsigned propertyCount() const { return 3; }
     PropertyPair property(unsigned i) const {
@@ -173,9 +173,9 @@ public:
 
     Util::shared_ptr<char> name() const {
         if (_content) {
-            return Util::share_static("set-content");
+            return Util::share_static_string("set-content");
         } else {
-            return Util::share_static("clear-content");
+            return Util::share_static_string("clear-content");
         }
     }
     unsigned propertyCount() const {
@@ -213,9 +213,9 @@ public:
 
     Util::shared_ptr<char> name() const {
         if (_value) {
-            return Util::share_static("set-attribute");
+            return Util::share_static_string("set-attribute");
         } else {
-            return Util::share_static("clear-attribute");
+            return Util::share_static_string("clear-attribute");
         }
     }
     unsigned propertyCount() const {
@@ -247,7 +247,7 @@ private:
 using Inkscape::Util::shared_ptr;
 using Inkscape::Util::share_string;
 using Inkscape::Util::share_unsafe;
-using Inkscape::Util::share_static;
+using Inkscape::Util::share_static_string;
 using Inkscape::Util::List;
 using Inkscape::Util::MutableList;
 using Inkscape::Util::cons;