diff options
| author | Alexander Arvidsson <2972103+AlexanderArvidsson@users.noreply.github.com> | 2025-01-08 00:03:04 +0100 |
|---|---|---|
| committer | Alexander Arvidsson <2972103+AlexanderArvidsson@users.noreply.github.com> | 2025-01-08 00:03:04 +0100 |
| commit | ee787e25db280a4441e3db1f8cb0ddf59985487c (patch) | |
| tree | d31b42be21e1afe9b12a92f02c8edc48d6733110 /bindgen | |
| parent | 6d3258fe678f3e31114ac66b6df7fa2f25daef4b (diff) | |
bindgen(zig): Fix empty comment leading whitespace
Diffstat (limited to 'bindgen')
| -rw-r--r-- | bindgen/gen_zig.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bindgen/gen_zig.py b/bindgen/gen_zig.py index 6229d019..446585e4 100644 --- a/bindgen/gen_zig.py +++ b/bindgen/gen_zig.py @@ -129,8 +129,9 @@ def l(s): def c(s, indent=""): if not s: return - prefix = f"{indent}/// " - l(textwrap.indent(textwrap.dedent(s), prefix=prefix, predicate=lambda line: True)) + prefix = f"{indent}///" + for line in textwrap.dedent(s).splitlines(): + l(f"{prefix} {line}" if line else prefix ) def as_zig_prim_type(s): return prim_types[s] |