0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 9.0.1059: build failure with some compilers

Problem:    Build failure with some compilers that can't handle a
            declaration directly after a "case" statement.
Solution:   Add a block to put the declarations in.
This commit is contained in:
Bram Moolenaar
2022-12-14 17:50:00 +00:00
parent 91c9d6d772
commit f94178db8d
2 changed files with 26 additions and 20 deletions

View File

@@ -5874,12 +5874,14 @@ echo_string_core(
break; break;
case VAR_OBJECT: case VAR_OBJECT:
{
garray_T ga; garray_T ga;
ga_init2(&ga, 1, 50); ga_init2(&ga, 1, 50);
ga_concat(&ga, (char_u *)"object of "); ga_concat(&ga, (char_u *)"object of ");
object_T *obj = tv->vval.v_object; object_T *obj = tv->vval.v_object;
class_T *cl = obj == NULL ? NULL : obj->obj_class; class_T *cl = obj == NULL ? NULL : obj->obj_class;
ga_concat(&ga, cl == NULL ? (char_u *)"[unknown]" : cl->class_name); ga_concat(&ga, cl == NULL ? (char_u *)"[unknown]"
: cl->class_name);
if (cl != NULL) if (cl != NULL)
{ {
ga_concat(&ga, (char_u *)" {"); ga_concat(&ga, (char_u *)" {");
@@ -5891,7 +5893,8 @@ echo_string_core(
ga_concat(&ga, m->om_name); ga_concat(&ga, m->om_name);
ga_concat(&ga, (char_u *)": "); ga_concat(&ga, (char_u *)": ");
char_u *tf = NULL; char_u *tf = NULL;
ga_concat(&ga, echo_string_core((typval_T *)(obj + 1) + i, ga_concat(&ga, echo_string_core(
(typval_T *)(obj + 1) + i,
&tf, numbuf, copyID, echo_style, &tf, numbuf, copyID, echo_style,
restore_copyID, composite_val)); restore_copyID, composite_val));
vim_free(tf); vim_free(tf);
@@ -5900,6 +5903,7 @@ echo_string_core(
} }
*tofree = r = ga.ga_data; *tofree = r = ga.ga_data;
}
break; break;
case VAR_FLOAT: case VAR_FLOAT:

View File

@@ -695,6 +695,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 */
/**/
1059,
/**/ /**/
1058, 1058,
/**/ /**/