From bbd2f340a2895ed59785f952b2585e6590602cad Mon Sep 17 00:00:00 2001 From: bfredl Date: Tue, 11 Jun 2024 10:25:32 +0200 Subject: refactor(memory): use builtin strcat() instead of STRCAT() The latter was mostly relevant with the past char_u madness. NOTE: STRCAT also functioned as a counterfeit "NOLINT" for clint apparently. But NOLINT-ing every usecase is just the same as disabling the check entirely. --- src/clint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 41058469b1..051f0e91e5 100755 --- a/src/clint.py +++ b/src/clint.py @@ -1995,7 +1995,7 @@ def CheckLanguage(filename, clean_lines, linenum, error): if match: error(filename, linenum, 'runtime/printf', 4, 'Use xstrlcpy, xmemcpyz or snprintf instead of %s' % match.group(1)) - match = Search(r'\b(STRNCAT|strncat|strcat|vim_strcat)\b', line) + match = Search(r'\b(STRNCAT|strncat|vim_strcat)\b', line) if match: error(filename, linenum, 'runtime/printf', 4, 'Use xstrlcat or snprintf instead of %s' % match.group(1)) -- cgit From 7dffc36e61c46e6adc92cff5944e876446f3c40e Mon Sep 17 00:00:00 2001 From: bfredl Date: Thu, 13 Jun 2024 12:00:58 +0200 Subject: refactor(declarations): also generate prototypes for functions in headers Before this change, "static inline" functions in headers needed to have their function attributes specified in a completely different way. The prototype had to be duplicated, and REAL_FATTR_ had to be used instead of the public FUNC_ATTR_ names. TODO: need a check that a "header.h.inline.generated.h" file is not forgotten when the first "static inline" function with attributes is added to a header (they would just be silently missing). --- src/clint.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 051f0e91e5..67185a7340 100755 --- a/src/clint.py +++ b/src/clint.py @@ -895,6 +895,7 @@ def CheckIncludes(filename, lines, error): if (not name.endswith('.h.generated.h') and not name.endswith('/defs.h') and not name.endswith('_defs.h') and + not name.endswith('h.inline.generated.h') and not name.endswith('_defs.generated.h') and not name.endswith('_enum.generated.h')): error(filename, i, 'build/include_defs', 5, -- cgit From fa79a8ad6deefeea81c1959d69aa4c8b2d993f99 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Thu, 8 Aug 2024 12:28:47 +0200 Subject: build(deps): vendor libvterm at v0.3.3 Problem: Adding support for modern Nvim features (reflow, OSC 8, full utf8/emoji support) requires coupling libvterm to Nvim internals (e.g., utf8proc). Solution: Vendor libvterm at v0.3.3. --- src/clint.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 67185a7340..cc144543a0 100755 --- a/src/clint.py +++ b/src/clint.py @@ -880,6 +880,7 @@ def CheckIncludes(filename, lines, error): "mpack/object.h", "nvim/func_attr.h", "termkey/termkey.h", + "vterm/vterm.h", ] for i in check_includes_ignore: -- cgit From 057d27a9d6ef0bb2ee5130704c45b9e9197e7c36 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 15 Sep 2024 12:20:58 -0700 Subject: refactor: rename "process" => "proc" #30387 Problem: - "process" is often used as a verb (`multiqueue_process_events`), which is ambiguous for cases where it's used as a topic. - The documented naming convention for processes is "proc". - `:help dev-name-common` - Shorter is better, when it doesn't harm readability or discoverability. Solution: Rename "process" => "proc" in all C symbols and module names. --- src/clint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index cc144543a0..28bdc66ce8 100755 --- a/src/clint.py +++ b/src/clint.py @@ -848,7 +848,7 @@ def CheckIncludes(filename, lines, error): or filename.endswith('.in.h') or FileInfo(filename).RelativePath() in { 'func_attr.h', - 'os/pty_process.h', + 'os/pty_proc.h', }): return @@ -869,7 +869,7 @@ def CheckIncludes(filename, lines, error): "src/nvim/msgpack_rpc/unpacker.h", "src/nvim/option.h", "src/nvim/os/pty_conpty_win.h", - "src/nvim/os/pty_process_win.h", + "src/nvim/os/pty_proc_win.h", ] skip_headers = [ -- cgit From 737f58e23230ea14f1648ac1fc7f442ea0f8563c Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 20 Sep 2024 07:34:50 +0200 Subject: refactor(api)!: rename Dictionary => Dict In the api_info() output: :new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val') ... {'return_type': 'ArrayOf(Integer, 2)', 'name': 'nvim_win_get_position', 'method': v:true, 'parameters': [['Window', 'window']], 'since': 1} The `ArrayOf(Integer, 2)` return type didn't break clients when we added it, which is evidence that clients don't use the `return_type` field, thus renaming Dictionary => Dict in api_info() is not (in practice) a breaking change. --- src/clint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 28bdc66ce8..1ed01382c8 100755 --- a/src/clint.py +++ b/src/clint.py @@ -1781,7 +1781,7 @@ def CheckSpacing(filename, clean_lines, linenum, error): r'(? Date: Thu, 26 Sep 2024 16:10:11 +0100 Subject: fix(diff): use mmfile_t in linematch Problem: Linematch used to use strchr to navigate a string, however strchr does not supoprt embedded NULs. Solution: Use `mmfile_t` instead of `char *` in linematch and introduce `strnchr()`. Also remove heap allocations from `matching_char_iwhite()` Fixes: #30505 --- src/clint.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src/clint.py') diff --git a/src/clint.py b/src/clint.py index 1ed01382c8..b57bbe354b 100755 --- a/src/clint.py +++ b/src/clint.py @@ -881,6 +881,7 @@ def CheckIncludes(filename, lines, error): "nvim/func_attr.h", "termkey/termkey.h", "vterm/vterm.h", + "xdiff/xdiff.h", ] for i in check_includes_ignore: -- cgit