mirror of
https://github.com/vim/vim.git
synced 2025-10-02 05:04:20 -04:00
patch 8.2.2538: crash when using Python list iterator
Problem: Crash when using Python list iterator. Solution: Increment the list reference count. (closes #7886)
This commit is contained in:
@@ -574,6 +574,9 @@ func Test_python3_list()
|
||||
py3 ll[2] = 8
|
||||
call assert_equal([1, 2, 8], l)
|
||||
|
||||
" iterating over list from Python
|
||||
py3 print([x for x in vim.Function("getline")(1, 2)])
|
||||
|
||||
" Using dict as an index
|
||||
call AssertException(['py3 ll[{}] = 10'],
|
||||
\ 'Vim(py3):TypeError: index must be int or slice, not dict')
|
||||
|
Reference in New Issue
Block a user