Mercurial > vim
diff src/scriptfile.c @ 32118:04d9dff67d99 v9.0.1390
patch 9.0.1390: FOR_ALL_ macros are defined in an unexpected file
Commit: https://github.com/vim/vim/commit/14113fdf9cb3d588c0d1c3a210246b981cf5aad3
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Tue Mar 7 17:13:51 2023 +0000
patch 9.0.1390: FOR_ALL_ macros are defined in an unexpected file
Problem: FOR_ALL_ macros are defined in an unexpected file.
Solution: Move FOR_ALL_ macros to macros.h. Add FOR_ALL_HASHTAB_ITEMS.
(Yegappan Lakshmanan, closes #12109)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 07 Mar 2023 18:15:04 +0100 |
parents | e16361210675 |
children | 730eebd56f48 |
line wrap: on
line diff
--- a/src/scriptfile.c +++ b/src/scriptfile.c @@ -1672,7 +1672,7 @@ do_source_ext( // is encountered without the "noclear" argument. ht = &SCRIPT_VARS(sid); todo = (int)ht->ht_used; - for (hi = ht->ht_array; todo > 0; ++hi) + FOR_ALL_HASHTAB_ITEMS(ht, hi, todo) if (!HASHITEM_EMPTY(hi)) { --todo; @@ -2063,7 +2063,7 @@ get_script_local_funcs(scid_T sid) // looking for functions with script ID 'sid'. functbl = func_tbl_get(); todo = functbl->ht_used; - for (hi = functbl->ht_array; todo > 0; ++hi) + FOR_ALL_HASHTAB_ITEMS(functbl, hi, todo) { ufunc_T *fp;