Skip to content

Commit

Permalink
Various bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
einarf committed Feb 7, 2021
1 parent 5e5870c commit 689207d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion opengl_registry/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def name(self):
@property
def value(self) -> str:
"""str: full declaration string"""
return self._name
return self._value

@property
def ptype(self) -> str:
Expand Down
5 changes: 5 additions & 0 deletions opengl_registry/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ def read_commands(self) -> Dict[str, Command]:
# A command should only have one proto tag
if child.tag == "proto":
command.proto = "".join(child.itertext())
try:
ptype = next(child.iter("ptype"))
command.ptype = ptype.text
except StopIteration:
pass
command.name = next(child.iter("name")).text
elif child.tag == "param":
name = next(child.iter("name")).text
Expand Down

0 comments on commit 689207d

Please sign in to comment.