build(vim-patch): n/a vim9 struct from *.h

Target v8.2.0543
This can catch stray '#define' but they're most likely 'TTFLAG' for
Vim9 types. N/A.
TTFLAG is used in 'static_types[]'.
See v9.0.0623.
This commit is contained in:
Jan Edmund Lazo
2026-08-01 08:51:39 -04:00
parent 9fbcb28ea6
commit d95b0fc12c
2 changed files with 8 additions and 2 deletions

View File

@@ -917,6 +917,7 @@ is_na_patch() {
local NA_REGEXP="$NVIM_SOURCE_DIR/scripts/vim_na_regexp.txt"
local NA_FILELIST="$NVIM_SOURCE_DIR/scripts/vim_na_files.txt"
local NA_HUNKS_C="$NVIM_SOURCE_DIR/scripts/vim_na_hunks_c.txt"
local NA_HUNKS_H="$NVIM_SOURCE_DIR/scripts/vim_na_hunks_h.txt"
local NA_HUNKS_VIM="$NVIM_SOURCE_DIR/scripts/vim_na_hunks_vim.txt"
local FILES_REMAINING HUNKS HUNK_NUM_FINAL
@@ -955,8 +956,12 @@ is_na_patch() {
'-I^\s*INIT\(= .+"E[0-9]+: .*:def ' \
'-I^\s*INIT\(= .+"E[0-9]+: .*enddef"' \
'-I^\s*INIT\(= .+"E[0-9]+: .*[vV]im9' \
"$patch" -- "$file")
test -n "${HUNKS}" && return 1
"$patch" -- "${file}" |
grep '^@@ .* @@')
if test -n "$HUNKS"; then
HUNK_NUM_FINAL=$(echo "$HUNKS" | sed 's/^@@ .* @@ \?//' | grep -cv -f "$NA_HUNKS_H")
test "$HUNK_NUM_FINAL" -ne 0 && return 1
fi
;;
*.c)
HUNKS=$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -r -b -U0 \