Mercurial > vim
comparison src/change.c @ 29442:827d9f2b7a71 v9.0.0063
patch 9.0.0063: too many type casts for dict_get functions
Commit: https://github.com/vim/vim/commit/d61efa50f8f5b9d9dcbc136705cc33874f0fdcb3
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 23 09:52:04 2022 +0100
patch 9.0.0063: too many type casts for dict_get functions
Problem: Too many type casts for dict_get functions.
Solution: Change the key argument from "char_u *" to "char *".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 23 Jul 2022 11:00:04 +0200 |
parents | fba9e366ced4 |
children | e134ff00be57 |
comparison
equal
deleted
inserted
replaced
29441:2a189fa0dcd7 | 29442:827d9f2b7a71 |
---|---|
170 linenr_T prev_lnume; | 170 linenr_T prev_lnume; |
171 | 171 |
172 FOR_ALL_LIST_ITEMS(buf->b_recorded_changes, li) | 172 FOR_ALL_LIST_ITEMS(buf->b_recorded_changes, li) |
173 { | 173 { |
174 prev_lnum = (linenr_T)dict_get_number( | 174 prev_lnum = (linenr_T)dict_get_number( |
175 li->li_tv.vval.v_dict, (char_u *)"lnum"); | 175 li->li_tv.vval.v_dict, "lnum"); |
176 prev_lnume = (linenr_T)dict_get_number( | 176 prev_lnume = (linenr_T)dict_get_number( |
177 li->li_tv.vval.v_dict, (char_u *)"end"); | 177 li->li_tv.vval.v_dict, "end"); |
178 if (prev_lnum >= lnum || prev_lnum > lnume || prev_lnume >= lnum) | 178 if (prev_lnum >= lnum || prev_lnum > lnume || prev_lnume >= lnum) |
179 { | 179 { |
180 // the current change is going to make the line number in | 180 // the current change is going to make the line number in |
181 // the older change invalid, flush now | 181 // the older change invalid, flush now |
182 invoke_listeners(curbuf); | 182 invoke_listeners(curbuf); |
382 | 382 |
383 FOR_ALL_LIST_ITEMS(buf->b_recorded_changes, li) | 383 FOR_ALL_LIST_ITEMS(buf->b_recorded_changes, li) |
384 { | 384 { |
385 varnumber_T lnum; | 385 varnumber_T lnum; |
386 | 386 |
387 lnum = dict_get_number(li->li_tv.vval.v_dict, (char_u *)"lnum"); | 387 lnum = dict_get_number(li->li_tv.vval.v_dict, "lnum"); |
388 if (start > lnum) | 388 if (start > lnum) |
389 start = lnum; | 389 start = lnum; |
390 lnum = dict_get_number(li->li_tv.vval.v_dict, (char_u *)"end"); | 390 lnum = dict_get_number(li->li_tv.vval.v_dict, "end"); |
391 if (end < lnum) | 391 if (end < lnum) |
392 end = lnum; | 392 end = lnum; |
393 added += dict_get_number(li->li_tv.vval.v_dict, (char_u *)"added"); | 393 added += dict_get_number(li->li_tv.vval.v_dict, "added"); |
394 } | 394 } |
395 argv[1].v_type = VAR_NUMBER; | 395 argv[1].v_type = VAR_NUMBER; |
396 argv[1].vval.v_number = start; | 396 argv[1].vval.v_number = start; |
397 argv[2].v_type = VAR_NUMBER; | 397 argv[2].v_type = VAR_NUMBER; |
398 argv[2].vval.v_number = end; | 398 argv[2].vval.v_number = end; |