Changeset View
Changeset View
Standalone View
Standalone View
src/lib/eo/eo.c
Show First 20 Lines • Show All 169 Lines • ▼ Show 20 Line(s) | |||||
170 | /** | 170 | /** | ||
171 | * This removes all nodes from the klass that are copied from mro | 171 | * This removes all nodes from the klass that are copied from mro | ||
172 | */ | 172 | */ | ||
173 | static void | 173 | static void | ||
174 | _vtable_mro_free(const _Efl_Class *klass) | 174 | _vtable_mro_free(const _Efl_Class *klass) | ||
175 | { | 175 | { | ||
176 | const _Efl_Class **mro_itr = klass->mro; | 176 | const _Efl_Class **mro_itr = klass->mro; | ||
177 | const Eo_Vtable *vtable = &klass->vtable; | 177 | const Eo_Vtable *vtable = &klass->vtable; | ||
178 | | ||||
179 | for ( ; *mro_itr ; mro_itr++) | 178 | for ( ; *mro_itr ; mro_itr++) | ||
180 | { | 179 | { | ||
181 | const Eo_Vtable *mro_vtable = &(*mro_itr)->vtable; | 180 | const Eo_Vtable *mro_vtable = &(*mro_itr)->vtable; | ||
182 | if ((*mro_itr) == klass) | 181 | if ((*mro_itr) == klass) | ||
183 | continue; | 182 | continue; | ||
184 | for (int i = 0; i < mro_vtable->size; ++i) | 183 | for (unsigned int i = 0; i < mro_vtable->size; ++i) | ||
185 | { | 184 | { | ||
186 | if (mro_vtable->chain[i].funcs == vtable->chain[i].funcs) | 185 | if (i == klass->class_id) | ||
187 | vtable->chain[i].funcs = NULL; | 186 | continue; | ||
187 | if (vtable->chain[i].funcs && mro_vtable->chain[i].funcs == vtable->chain[i].funcs) | ||||
188 | { | ||||
189 | vtable->chain[i].funcs = NULL; | ||||
190 | } | ||||
188 | } | 191 | } | ||
189 | } | 192 | } | ||
190 | } | 193 | } | ||
191 | 194 | | |||
192 | static void | 195 | static void | ||
193 | _vtable_free(Eo_Vtable *vtable, const Eo_Vtable *root) | 196 | _vtable_free(Eo_Vtable *vtable, const Eo_Vtable *root) | ||
194 | { | 197 | { | ||
195 | if (root) | 198 | if (root) | ||
▲ Show 20 Lines • Show All 3644 Lines • Show Last 20 Lines |