1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0167
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 8.1.0167
Problem: Lock flag in new dictitem is reset in many places.
Solution: Always reset the lock flag.
Files: src/dict.c, src/channel.c, src/ex_cmds2.c, src/userfunc.c,
src/if_perl.xs, src/if_py_both.h
*** ../vim-8.1.0166/src/dict.c Sun Jul 8 16:50:33 2018
--- src/dict.c Sun Jul 8 17:06:50 2018
***************
*** 188,194 ****
/*
* Allocate a Dictionary item.
* The "key" is copied to the new item.
! * Note that the value of the item "di_tv" still needs to be initialized!
* Returns NULL when out of memory.
*/
dictitem_T *
--- 188,195 ----
/*
* Allocate a Dictionary item.
* The "key" is copied to the new item.
! * Note that the type and value of the item "di_tv" still needs to be
! * initialized!
* Returns NULL when out of memory.
*/
dictitem_T *
***************
*** 201,206 ****
--- 202,208 ----
{
STRCPY(di->di_key, key);
di->di_flags = DI_FLAGS_ALLOC;
+ di->di_tv.v_lock = 0;
}
return di;
}
***************
*** 338,344 ****
item = dictitem_alloc((char_u *)key);
if (item == NULL)
return FAIL;
- item->di_tv.v_lock = 0;
item->di_tv.v_type = VAR_NUMBER;
item->di_tv.vval.v_number = nr;
if (dict_add(d, item) == FAIL)
--- 340,345 ----
***************
*** 361,367 ****
item = dictitem_alloc((char_u *)key);
if (item == NULL)
return FAIL;
- item->di_tv.v_lock = 0;
item->di_tv.v_type = VAR_STRING;
item->di_tv.vval.v_string = str != NULL ? vim_strsave(str) : NULL;
if (dict_add(d, item) == FAIL)
--- 362,367 ----
***************
*** 384,390 ****
item = dictitem_alloc((char_u *)key);
if (item == NULL)
return FAIL;
- item->di_tv.v_lock = 0;
item->di_tv.v_type = VAR_LIST;
item->di_tv.vval.v_list = list;
++list->lv_refcount;
--- 384,389 ----
***************
*** 408,414 ****
item = dictitem_alloc((char_u *)key);
if (item == NULL)
return FAIL;
- item->di_tv.v_lock = 0;
item->di_tv.v_type = VAR_DICT;
item->di_tv.vval.v_dict = dict;
++dict->dv_refcount;
--- 407,412 ----
*** ../vim-8.1.0166/src/channel.c Sun Jul 8 16:50:33 2018
--- src/channel.c Sun Jul 8 17:05:44 2018
***************
*** 5742,5748 ****
item = dictitem_alloc((char_u *)"channel");
if (item == NULL)
return;
- item->di_tv.v_lock = 0;
item->di_tv.v_type = VAR_CHANNEL;
item->di_tv.vval.v_channel = job->jv_channel;
if (job->jv_channel != NULL)
--- 5742,5747 ----
*** ../vim-8.1.0166/src/ex_cmds2.c Sun Jul 8 16:50:33 2018
--- src/ex_cmds2.c Sun Jul 8 17:07:59 2018
***************
*** 1524,1530 ****
di->di_tv.v_type = VAR_FUNC;
di->di_tv.vval.v_string = vim_strsave(timer->tr_callback);
}
- di->di_tv.v_lock = 0;
}
}
--- 1524,1529 ----
*** ../vim-8.1.0166/src/userfunc.c Sat Jun 30 18:27:59 2018
--- src/userfunc.c Sun Jul 8 17:10:33 2018
***************
*** 2390,2396 ****
/* overwrite existing dict entry */
clear_tv(&fudi.fd_di->di_tv);
fudi.fd_di->di_tv.v_type = VAR_FUNC;
- fudi.fd_di->di_tv.v_lock = 0;
fudi.fd_di->di_tv.vval.v_string = vim_strsave(name);
/* behave like "dict" was used */
--- 2390,2395 ----
*** ../vim-8.1.0166/src/if_perl.xs Tue Mar 6 12:22:50 2018
--- src/if_perl.xs Sun Jul 8 17:11:10 2018
***************
*** 1200,1209 ****
if ((item = dictitem_alloc((char_u *)key)) == NULL)
break;
!
! item->di_tv.v_type = VAR_NUMBER;
! item->di_tv.v_lock = 0;
! item->di_tv.vval.v_number = 0;
if (dict_add(dict, item) == FAIL) {
dictitem_free(item);
--- 1200,1207 ----
if ((item = dictitem_alloc((char_u *)key)) == NULL)
break;
! item->di_tv.v_type = VAR_NUMBER;
! item->di_tv.vval.v_number = 0;
if (dict_add(dict, item) == FAIL) {
dictitem_free(item);
*** ../vim-8.1.0166/src/if_py_both.h Sun Jun 10 13:55:48 2018
--- src/if_py_both.h Sun Jul 8 17:12:13 2018
***************
*** 1832,1838 ****
PyErr_NoMemory();
return -1;
}
- di->di_tv.v_lock = 0;
di->di_tv.v_type = VAR_UNKNOWN;
if (dict_add(dict, di) == FAIL)
--- 1832,1837 ----
***************
*** 2038,2044 ****
PyErr_NoMemory();
return NULL;
}
- di->di_tv.v_lock = 0;
di->di_tv.v_type = VAR_UNKNOWN;
valObject = PySequence_Fast_GET_ITEM(fast, 1);
--- 2037,2042 ----
***************
*** 5852,5858 ****
dict_unref(dict);
return -1;
}
- di->di_tv.v_lock = 0;
if (_ConvertFromPyObject(valObject, &di->di_tv, lookup_dict) == -1)
{
--- 5850,5855 ----
***************
*** 5950,5956 ****
PyErr_NoMemory();
return -1;
}
- di->di_tv.v_lock = 0;
if (_ConvertFromPyObject(valObject, &di->di_tv, lookup_dict) == -1)
{
--- 5947,5952 ----
*** ../vim-8.1.0166/src/version.c Sun Jul 8 16:50:33 2018
--- src/version.c Sun Jul 8 17:18:05 2018
***************
*** 791,792 ****
--- 791,794 ----
{ /* Add new patch number below this line */
+ /**/
+ 167,
/**/
--
hundred-and-one symptoms of being an internet addict:
208. Your goals for the future are obtaining an T1 connection and
a 130 gig hard drive.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|