aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-09-07 15:40:20 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-09-07 18:11:37 +0000
commit4f03dbe5e35b3682ba86c820bcc22b762f970d8c (patch)
tree9cc930bf6bd1d95f60434a5c48d0dca3d4b7f683 /sources
parentd24d83a1050af5ac05b5bf4b3b9c2e1a2d362ed7 (diff)
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 <tismer@stackless.com>
Diffstat (limited to 'sources')
-rw-r--r--sources/shiboken2/ApiExtractor/typesystem.cpp20
1 files changed, 12 insertions, 8 deletions
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;