proto: make proto doesn't handle bool type correctly
Commit:
https://github.com/vim/vim/commit/823f4f12b8a360ef16dbae6d90c2caa7d4d9fb21
Author: Hirohito Higashi <[email protected]>
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 <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
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};")
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1vsQXI-00HEKJ-1t%40256bit.org.