Patch 8.2.3240

6 views
Skip to first unread message

Bram Moolenaar

unread,
Jul 28, 2021, 3:49:36 PM7/28/21
to vim...@googlegroups.com

Patch 8.2.3240
Problem: Lua print() does not work properly.
Solution: Put back lua_pop().
Files: src/if_lua.c, src/testdir/test_lua.vim


*** ../vim-8.2.3239/src/if_lua.c 2021-07-28 15:06:57.791381469 +0200
--- src/if_lua.c 2021-07-28 19:56:58.044331012 +0200
***************
*** 1737,1742 ****
--- 1737,1743 ----
if (i > 1)
luaL_addchar(&b, ' '); // use space instead of tab
luaV_addlstring(&b, s, l, 0);
+ lua_pop(L, 1);
}
luaL_pushresult(&b);
if (!got_int)
*** ../vim-8.2.3239/src/testdir/test_lua.vim 2021-07-28 15:06:57.791381469 +0200
--- src/testdir/test_lua.vim 2021-07-28 19:55:48.624458167 +0200
***************
*** 870,877 ****

" Test for dealing with strings containing newlines and null character
func Test_lua_string_with_newline()
! let x = execute('lua print("Hello\nWorld")')
! call assert_equal("\nHello\nWorld", x)
new
lua k = vim.buffer(vim.eval('bufnr()'))
lua k:insert("Hello\0World", 0)
--- 870,877 ----

" Test for dealing with strings containing newlines and null character
func Test_lua_string_with_newline()
! let x = execute('lua print("Hello\nWorld", 2)')
! call assert_equal("\nHello\nWorld 2", x)
new
lua k = vim.buffer(vim.eval('bufnr()'))
lua k:insert("Hello\0World", 0)
*** ../vim-8.2.3239/src/version.c 2021-07-28 21:25:45.360602797 +0200
--- src/version.c 2021-07-28 21:48:25.865107660 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3240,
/**/

--
God made the integers; all else is the work of Man.
-- Kronecker

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Bram Moolenaar

unread,
Jul 28, 2021, 4:14:58 PM7/28/21
to vim...@googlegroups.com, Bram Moolenaar

> Patch 8.2.3240
> Problem: Lua print() does not work properly.
> Solution: Put back lua_pop().
> Files: src/if_lua.c, src/testdir/test_lua.vim

So now we see the crash on CI, since the test for print() is still
there. I hope someone knows how to fix this.

--
Women are probably the main cause of free software starvation.
Reply all
Reply to author
Forward
0 new messages