Mercurial > vim
comparison src/eval.c @ 512:f607f15ab091 v7.0143
updated for version 7.0143
author | vimboss |
---|---|
date | Wed, 07 Sep 2005 21:22:27 +0000 |
parents | a1059cda45f2 |
children | 594f25e4a806 |
comparison
equal
deleted
inserted
replaced
511:32cf0d2e14b4 | 512:f607f15ab091 |
---|---|
2829 EMSG(_(e_listreq)); | 2829 EMSG(_(e_listreq)); |
2830 clear_tv(&tv); | 2830 clear_tv(&tv); |
2831 } | 2831 } |
2832 else | 2832 else |
2833 { | 2833 { |
2834 /* No need to increment the refcount, it's already set for the | |
2835 * list being used in "tv". */ | |
2834 fi->fi_list = l; | 2836 fi->fi_list = l; |
2835 list_add_watch(l, &fi->fi_lw); | 2837 list_add_watch(l, &fi->fi_lw); |
2836 fi->fi_lw.lw_item = l->lv_first; | 2838 fi->fi_lw.lw_item = l->lv_first; |
2837 } | 2839 } |
2838 } | 2840 } |
5859 else | 5861 else |
5860 dd = dd->dv_used_next; | 5862 dd = dd->dv_used_next; |
5861 | 5863 |
5862 /* | 5864 /* |
5863 * 3. Go through the list of lists and free items without the copyID. | 5865 * 3. Go through the list of lists and free items without the copyID. |
5866 * But don't free a list that has a watcher (used in a for loop), these | |
5867 * are not referenced anywhere. | |
5864 */ | 5868 */ |
5865 for (ll = first_list; ll != NULL; ) | 5869 for (ll = first_list; ll != NULL; ) |
5866 if (ll->lv_copyID != copyID) | 5870 if (ll->lv_copyID != copyID && ll->lv_watch == NULL) |
5867 { | 5871 { |
5868 list_free(ll); | 5872 list_free(ll); |
5869 did_free = TRUE; | 5873 did_free = TRUE; |
5870 | 5874 |
5871 /* restart, next dict may also have been freed */ | 5875 /* restart, next list may also have been freed */ |
5872 ll = first_list; | 5876 ll = first_list; |
5873 } | 5877 } |
5874 else | 5878 else |
5875 ll = ll->lv_used_next; | 5879 ll = ll->lv_used_next; |
5876 | 5880 |