Skip to content

Commit

Permalink
Merge pull request #4701 from georgerennie/george/pyosys_noreturn_attrs
Browse files Browse the repository at this point in the history
pyosys generator: ignore attributes
  • Loading branch information
widlarizer authored Nov 20, 2024
2 parents cc17d5b + de728c9 commit da8c8b4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions misc/py_wrap_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,11 @@ def from_string(str_def, containing_file, class_, line_number, namespace):
func.duplicate = False
func.namespace = namespace
str_def = str_def.replace("operator ","operator")

# remove attributes from the start
if str.startswith(str_def, "[[") and "]]" in str_def:
str_def = str_def[str_def.find("]]")+2:]

if str.startswith(str_def, "static "):
func.is_static = True
str_def = str_def[7:]
Expand Down

0 comments on commit da8c8b4

Please sign in to comment.