task-vuplus-enigma2
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-enigma2 / libsigc++-1.2 / libsigc++-1.2-1.2.5 / to_1.2.7.patch
1 diff -Naur libsigc++-1.2.5/sigc++/macros/signal.h.m4 libsigc++-1.2.7/sigc++/macros/signal.h.m4
2 --- libsigc++-1.2.5/sigc++/macros/signal.h.m4   2003-03-06 09:06:12.000000000 +0100
3 +++ libsigc++-1.2.7/sigc++/macros/signal.h.m4   2005-01-29 00:10:34.000000000 +0100
4 @@ -82,6 +82,8 @@
5        bool empty();
6        void clear();
7        void cleanup(); // nothrow
8 +   private:
9 +      void _remove(SignalConnectionNode* c);
10    };
11  
12  class LIBSIGC_API SignalBase\r
13 diff -Naur libsigc++-1.2.5/sigc++/object.h libsigc++-1.2.7/sigc++/object.h
14 --- libsigc++-1.2.5/sigc++/object.h     2003-05-08 21:35:11.000000000 +0200
15 +++ libsigc++-1.2.7/sigc++/object.h     2012-02-14 13:08:00.193044640 +0100
16 @@ -69,7 +69,7 @@
17        virtual void unreference() const;\r
18        virtual void set_manage();\r
19  \r
20 -      ObjectBase& operator=(const ObjectBase& /* o */)\r
21 +      ObjectBase& operator=(const ObjectBase& o)\r
22          { return *this; }\r
23  \r
24        ObjectBase()\r
25 @@ -79,7 +79,11 @@
26          : control_(0) {}\r
27  \r
28        virtual ~ObjectBase()=0;\r
29 -      \r
30 +\r
31 +      Control_* control() const \r
32 +        { \r
33 +          return const_cast<ObjectBase *>(this)->control(); \r
34 +        }\r
35        Control_* control() \r
36          { \r
37            if (!control_) \r
38 @@ -129,7 +133,6 @@
39        template <class T2>\r
40        Ptr(const Ptr<T2>& p2) \r
41          {\r
42 -          T* test_assignment_ = (T2*)0;\r
43            assign( p2.get() );\r
44          }\r
45  \r
46 @@ -144,7 +147,7 @@
47  \r
48        template <class T2>\r
49        Ptr& operator=(const Ptr<T2>& p2)\r
50 -        { T *test_assignment_=(T2*)0; reset(p2.get()); return *this; }\r
51 +        { reset(p2.get()); return *this; }\r
52      \r
53        Ptr& operator=(const Ptr& p)\r
54          { reset(p.get()); return *this; }\r
55 @@ -175,7 +178,7 @@
56            if (control_)\r
57              control_->ref();\r
58          }\r
59 -\r
60 +      \r
61        void reset(T* t = 0)\r
62          {\r
63            if (object_ == t)\r
64 @@ -197,4 +200,3 @@
65  \r
66  \r
67  #endif // SIGC_OBJECT\r
68 -\r
69 diff -Naur libsigc++-1.2.5/sigc++/signal.cc libsigc++-1.2.7/sigc++/signal.cc
70 --- libsigc++-1.2.5/sigc++/signal.cc    2002-12-12 20:18:24.000000000 +0100
71 +++ libsigc++-1.2.7/sigc++/signal.cc    2005-01-29 00:10:34.000000000 +0100
72 @@ -93,33 +93,11 @@
73      defered_ = false;
74  
75      SignalConnectionNode* i = begin_;
76 -
77 -    while(begin_ && begin_->defered_)
78 -      begin_ = begin_->next_;
79 -
80 -    while(end_ && end_->defered_)
81 -      end_ = end_->prev_;
82 -
83 -    // Hmm, this looks a bit tricky to me.  The code above removes all
84 -    // elements from the front and the back that have defered_ = true set.
85 -    // But the following loop unreferences *all* defered elements, including
86 -    // those that are still in the list.
87 -    //
88 -    // I don't know whether this is a bug -- it's possible that defered nodes
89 -    // are always at the front or back.  If not, a node could be unreferenced
90 -    // twice which is bad.
91 -    //
92 -    // --Daniel
93 -
94      while(i)
95      {
96        SignalConnectionNode* next = i->next_;
97 -
98        if(i->defered_)
99 -      {
100 -        i->parent_ = 0;
101 -        i->unreference();
102 -      }
103 +       _remove(i);
104  
105        i = next;
106      }
107 @@ -141,7 +119,7 @@
108        begin_->prev_=c;
109      else
110        end_=c;
111 -    end_=c;
112 +    begin_=c;
113      return c;
114    }
115  
116 @@ -161,21 +139,8 @@
117  
118  void SignalNode::remove(SignalConnectionNode* c)
119    {
120 -    if (!exec_count_)
121 -      {
122 -        if (c->prev_)
123 -          c->prev_->next_=c->next_;
124 -        else
125 -          begin_=c->next_;
126 -       
127 -        if (c->next_)
128 -          c->next_->prev_=c->prev_;
129 -        else
130 -          end_=c->prev_;
131 -
132 -        c->parent_ = 0;
133 -        c->unreference();
134 -      }
135 +    if(!exec_count_)
136 +      _remove(c);
137      else
138        {
139          c->defered_=true;
140 @@ -184,6 +149,19 @@
141        }
142    }
143  
144 +void SignalNode::_remove(SignalConnectionNode* c)
145 +  {
146 +    if (c->prev_)
147 +       c->prev_->next_=c->next_;
148 +    else
149 +       begin_=c->next_;
150 +    if (c->next_)
151 +       c->next_->prev_=c->prev_;
152 +    else
153 +       end_=c->prev_;
154 +    c->parent_ = 0;
155 +    c->unreference();
156 +  }
157  
158  
159  /**********************************************************/