diff options
-rw-r--r-- | libshiboken/basewrapper.cpp | 4 | ||||
-rw-r--r-- | libshiboken/basewrapper_p.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp index 055d7e62..fd686e3e 100644 --- a/libshiboken/basewrapper.cpp +++ b/libshiboken/basewrapper.cpp @@ -615,7 +615,7 @@ static void _destroyParentInfo(SbkObject* obj, bool keepReference) ParentInfo* pInfo = obj->d->parentInfo; if (pInfo) { while(!pInfo->children.empty()) { - SbkObject* first = pInfo->children.front(); + SbkObject* first = *pInfo->children.begin(); // Mark child as invalid Shiboken::Object::invalidate(first); removeParent(first, false, keepReference); @@ -941,7 +941,7 @@ void setParent(PyObject* parent, PyObject* child) pInfo = child_->d->parentInfo = new ParentInfo; pInfo->parent = parent_; - parent_->d->parentInfo->children.push_back(child_); + parent_->d->parentInfo->children.insert(child_); // Add Parent ref Py_INCREF(child_); diff --git a/libshiboken/basewrapper_p.h b/libshiboken/basewrapper_p.h index f4ab6e65..5840b8c3 100644 --- a/libshiboken/basewrapper_p.h +++ b/libshiboken/basewrapper_p.h @@ -40,7 +40,7 @@ typedef std::map<std::string, std::list<SbkObject*> > RefCountMap; /// Linked list of SbkBaseWrapper pointers -typedef std::list<SbkObject*> ChildrenList; +typedef std::set<SbkObject*> ChildrenList; /// Struct used to store information about object parent and children. struct ParentInfo |