diff src/evalfunc.c @ 24083:1765b5b0f08d v8.2.2583

patch 8.2.2583: Vim9: cannot compare result of getenv() with null Commit: https://github.com/vim/vim/commit/7ad67d1150a1e48371d64e2919591c38b80e7cfc Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 10 16:08:26 2021 +0100 patch 8.2.2583: Vim9: cannot compare result of getenv() with null Problem: Vim9: cannot compare result of getenv() with null. Solution: Make the return type of getenv() "any". (closes https://github.com/vim/vim/issues/7943)
author Bram Moolenaar <Bram@vim.org>
date Wed, 10 Mar 2021 16:15:03 +0100
parents 44be09b25619
children c3d1f65365c4
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -1021,7 +1021,7 @@ static funcentry_T global_functions[] =
     {"getcwd",		0, 2, FEARG_1,	    NULL,
 			ret_string,	    f_getcwd},
     {"getenv",		1, 1, FEARG_1,	    NULL,
-			ret_string,	    f_getenv},
+			ret_any,	    f_getenv},
     {"getfontname",	0, 1, 0,	    NULL,
 			ret_string,	    f_getfontname},
     {"getfperm",	1, 1, FEARG_1,	    NULL,