Skip to content

Commit

Permalink
pyosys generator: ignore attributes
Browse files Browse the repository at this point in the history
* this allows log_error, log_file_error and log_cmd_error which are all
  marked [[noreturn]] to be supported
  • Loading branch information
georgerennie committed Nov 21, 2024
1 parent 4fb15a4 commit 89c2f3f
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 89c2f3f

Please sign in to comment.