From: Hirohito Higashi Date: Mon, 16 Feb 2026 22:20:50 +0000 (+0000) Subject: proto: make proto doesn't handle bool type correctly X-Git-Tag: v9.2.0015~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=823f4f12b8a360ef16dbae6d90c2caa7d4d9fb21;p=thirdparty%2Fvim.git proto: make proto doesn't handle bool type correctly closes: #19436 Signed-off-by: Hirohito Higashi Signed-off-by: Christian Brabandt --- diff --git a/src/proto/gen_prototypes.py b/src/proto/gen_prototypes.py index c11652bb15..0458b4f88a 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 ) to _Bool. + # Restore it to bool for readability. + header = re.sub(r'\b_Bool\b', 'bool', header) if header: protos.append(f"{header};")