From 9838a336d5a414448b39f6f2504bf146b2e1496e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 31 Mar 2021 15:18:19 +0530 Subject: [PATCH] Make wcwidth-std.h more generally includeable --- gen-wcwidth.py | 2 +- kitty/wcwidth-std.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gen-wcwidth.py b/gen-wcwidth.py index 8d640eedb..73ef3d194 100755 --- a/gen-wcwidth.py +++ b/gen-wcwidth.py @@ -504,7 +504,7 @@ def gen_wcwidth() -> None: p('\t\t// }}}\n') with create_header('kitty/wcwidth-std.h') as p: - p('static int\nwcwidth_std(int32_t code) {') + p('static inline int\nwcwidth_std(int32_t code) {') p('\tif (LIKELY(0x20 <= code && code <= 0x7e)) return 1;') p('\tswitch(code) {') diff --git a/kitty/wcwidth-std.h b/kitty/wcwidth-std.h index 6a8a74e7d..6c179cee6 100644 --- a/kitty/wcwidth-std.h +++ b/kitty/wcwidth-std.h @@ -5,7 +5,7 @@ START_ALLOW_CASE_RANGE -static int +static inline int wcwidth_std(int32_t code) { if (LIKELY(0x20 <= code && code <= 0x7e)) return 1; switch(code) {