From 4f03dbe5e35b3682ba86c820bcc22b762f970d8c Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 7 Sep 2018 15:40:20 +0200 Subject: shiboken: Fix parsing of typedef typesystem entries Pop the parse stack entry for typedef entries as well which was overlooked in bfd1de3495b18c0ecc251260442a9a46009861e. Task-number: PYSIDE-725 Change-Id: If1f572076b9442ed3a434e3b6fb7b10c17def12d Reviewed-by: Christian Tismer --- sources/shiboken2/ApiExtractor/typesystem.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'sources/shiboken2/ApiExtractor/typesystem.cpp') diff --git a/sources/shiboken2/ApiExtractor/typesystem.cpp b/sources/shiboken2/ApiExtractor/typesystem.cpp index d78dad369..1f311b73d 100644 --- a/sources/shiboken2/ApiExtractor/typesystem.cpp +++ b/sources/shiboken2/ApiExtractor/typesystem.cpp @@ -713,14 +713,18 @@ bool Handler::endElement(const QStringRef &localName) break; } - if (m_current->type == StackElement::Root - || m_current->type == StackElement::NamespaceTypeEntry - || m_current->type == StackElement::InterfaceTypeEntry - || m_current->type == StackElement::ObjectTypeEntry - || m_current->type == StackElement::ValueTypeEntry - || m_current->type == StackElement::PrimitiveTypeEntry) { - StackElementContext* context = m_contextStack.pop(); - delete context; + switch (m_current->type) { + case StackElement::Root: + case StackElement::NamespaceTypeEntry: + case StackElement::InterfaceTypeEntry: + case StackElement::ObjectTypeEntry: + case StackElement::ValueTypeEntry: + case StackElement::PrimitiveTypeEntry: + case StackElement::TypedefTypeEntry: + delete m_contextStack.pop(); + break; + default: + break; } StackElement *child = m_current; -- cgit v1.2.3