Commit: proto: make proto doesn't handle bool type correctly

2 views
Skip to first unread message

Christian Brabandt

unread,
Feb 17, 2026, 2:16:44 PM (2 days ago) Feb 17
to vim...@googlegroups.com
proto: make proto doesn't handle bool type correctly

Commit: https://github.com/vim/vim/commit/823f4f12b8a360ef16dbae6d90c2caa7d4d9fb21
Author: Hirohito Higashi <h.eas...@gmail.com>
Date: Mon Feb 16 22:20:50 2026 +0000

proto: make proto doesn't handle bool type correctly

closes: https://github.com/vim/vim/issues/19436

Signed-off-by: Hirohito Higashi <h.eas...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/proto/gen_prototypes.py b/src/proto/gen_prototypes.py
index c11652bb1..0458b4f88 100644
--- a/src/proto/gen_prototypes.py
+++ b/src/proto/gen_prototypes.py
@@ -441,6 +441,9 @@ def generate_prototypes(tu, src_path: Path) -> List[str]:
print(f"[def] {fn.spelling}", file=sys.stderr)
toks = tokens_for_function_header(fn)
header = join_tokens(toks) if toks else header_from_cursor(fn)
+ # libclang expands the bool macro (from <stdbool.h>) to _Bool.
+ # Restore it to bool for readability.
+ header = re.sub(r' _Bool ', 'bool', header)
if header:
protos.append(f"{header};")

Reply all
Reply to author
Forward
0 new messages