Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast type lookup #6241

Open
wants to merge 6 commits into
base: 1.4
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor(nc): Small cleanup in ExtensionObject parsing
  • Loading branch information
jpfr committed Jan 21, 2024
commit 8570e7429df3a8fb567b179a918bc227482a1b93
14 changes: 7 additions & 7 deletions tools/nodeset_compiler/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,17 +247,17 @@ def __parseXMLSingleValue(self, xmlvalue, parentDataTypeNode, parent, parser, al
# in the ExtensionObject and none of them is set.
if(ebodypart is not None):
if ebodypart.localName == "SwitchField":
# The switch field is the index of the available union fields starting with 1
# The switch field is the index of the available union
# fields starting with 1
data = int(ebodypart.firstChild.data)
if data == 0:
# If the switch field is 0 then no field is present. A Union with no fields present has the same meaning as a NULL value.
members = []
else:
members = []
members = []
# If the switch field is 0 then no field is present. A
# Union with no fields present has the same meaning as a
# NULL value.
if data != 0:
members.append(enc.members[data-1])
ebodypart = getNextElementNode(ebodypart)


for e in members:
# ebodypart can be None if the field is not set, although the field is not optional.
if ebodypart is None:
Expand Down