patch 9.0.1727: minor problems with the teapot

Commit: 
https://github.com/vim/vim/commit/b0efa49ed179d3aa1fa0358d4c3c6d35a0efb291
Author: Sean Dewar <seande...@users.noreply.github.com>
Date:   Sat Jul 8 10:35:19 2023 +0100

    patch 9.0.1727: minor problems with the teapot
    
    Problem: minor problems with the teapot()
    Solution: remove the null check, update documentation
    
    Update the builtin-function-list entry. (It implicitly returns 0, but such
    functions usually use "none")
    
    Also, tv_get_string_strict() can not return NULL, so remove that check
    
    closes: #12647
    
    Signed-off-by: Christian Brabandt <c...@256bit.org>
    Co-authored-by: Sean Dewar <seande...@users.noreply.github.com>

diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 2f6961d7d..6a5ec1bac 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -156,7 +156,7 @@ digraph_setlist({digraphlist})      Boolean register 
multiple |digraph|s
 echoraw({expr})                        none    output {expr} as-is
 empty({expr})                  Number  |TRUE| if {expr} is empty
 environ()                      Dict    return environment variables
-err_teapot()                   Number  produce error 418
+err_teapot([{expr}])           none    give E418, or E503 if {expr} is |TRUE|
 escape({string}, {chars})      String  escape {chars} in {string} with '\'
 eval({string})                 any     evaluate {string} into its value
 eventhandler()                 Number  |TRUE| if inside an event handler
diff --git a/src/evalfunc.c b/src/evalfunc.c
index ab6606f76..ef0414c68 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -3936,7 +3936,7 @@ f_err_teapot(typval_T *argvars, typval_T *rettv UNUSED)
        if (argvars[0].v_type == VAR_STRING)
        {
            char_u *s = tv_get_string_strict(&argvars[0]);
-           if (s == NULL || *skipwhite(s) == NUL)
+           if (*skipwhite(s) == NUL)
                return;
        }
 
diff --git a/src/version.c b/src/version.c
index 0661b279b..b9e584d20 100644
--- a/src/version.c
+++ b/src/version.c
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1727,
 /**/
     1726,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qWk68-006Zee-8A%40256bit.org.

Raspunde prin e-mail lui