forked from aniani/vim
patch 9.1.0367: compile_def_function is too long
Problem: compile_def_function is too long Solution: Move out the code to compile the body of a function (Yegappan Lakshmanan) closes: #14622 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
ea999037a4
commit
a16f251333
@ -4785,6 +4785,8 @@ def Test_typename()
|
|||||||
endif
|
endif
|
||||||
assert_equal('class<Unknown>', typename(null_class))
|
assert_equal('class<Unknown>', typename(null_class))
|
||||||
assert_equal('object<Unknown>', typename(null_object))
|
assert_equal('object<Unknown>', typename(null_object))
|
||||||
|
var l: list<func(list<number>): number> = [function('min')]
|
||||||
|
assert_equal('list<func(list<number>): number>', typename(l))
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
def Test_undofile()
|
def Test_undofile()
|
||||||
|
@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
367,
|
||||||
/**/
|
/**/
|
||||||
366,
|
366,
|
||||||
/**/
|
/**/
|
||||||
|
1104
src/vim9compile.c
1104
src/vim9compile.c
File diff suppressed because it is too large
Load Diff
@ -1894,14 +1894,12 @@ type_name_list_or_dict(char *name, type_T *type, char **tofree)
|
|||||||
|
|
||||||
size_t len = STRLEN(name) + STRLEN(member_name) + 3;
|
size_t len = STRLEN(name) + STRLEN(member_name) + 3;
|
||||||
*tofree = alloc(len);
|
*tofree = alloc(len);
|
||||||
if (*tofree != NULL)
|
if (*tofree == NULL)
|
||||||
{
|
return name;
|
||||||
vim_snprintf(*tofree, len, "%s<%s>", name, member_name);
|
|
||||||
vim_free(member_free);
|
|
||||||
return *tofree;
|
|
||||||
}
|
|
||||||
|
|
||||||
return name;
|
vim_snprintf(*tofree, len, "%s<%s>", name, member_name);
|
||||||
|
vim_free(member_free);
|
||||||
|
return *tofree;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1924,17 +1922,15 @@ type_name_class_or_obj(char *name, type_T *type, char **tofree)
|
|||||||
|
|
||||||
size_t len = STRLEN(name) + STRLEN(class_name) + 3;
|
size_t len = STRLEN(name) + STRLEN(class_name) + 3;
|
||||||
*tofree = alloc(len);
|
*tofree = alloc(len);
|
||||||
if (*tofree != NULL)
|
if (*tofree == NULL)
|
||||||
{
|
return name;
|
||||||
vim_snprintf(*tofree, len, "%s<%s>", name, class_name);
|
|
||||||
return *tofree;
|
|
||||||
}
|
|
||||||
|
|
||||||
return name;
|
vim_snprintf(*tofree, len, "%s<%s>", name, class_name);
|
||||||
|
return *tofree;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the type name of a functio.
|
* Return the type name of a function.
|
||||||
* The result may be in allocated memory, in which case "tofree" is set.
|
* The result may be in allocated memory, in which case "tofree" is set.
|
||||||
*/
|
*/
|
||||||
static char *
|
static char *
|
||||||
|
Loading…
x
Reference in New Issue
Block a user