To: vim_dev@googlegroups.com Subject: Patch 9.0.1059 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1059 (after 9.0.1058) 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. Files: src/eval.c *** ../vim-9.0.1058/src/eval.c 2022-12-14 17:30:34.105232856 +0000 --- src/eval.c 2022-12-14 17:47:19.287211437 +0000 *************** *** 5874,5905 **** break; case VAR_OBJECT: - garray_T ga; - ga_init2(&ga, 1, 50); - ga_concat(&ga, (char_u *)"object of "); - object_T *obj = tv->vval.v_object; - class_T *cl = obj == NULL ? NULL : obj->obj_class; - ga_concat(&ga, cl == NULL ? (char_u *)"[unknown]" : cl->class_name); - if (cl != NULL) { ! ga_concat(&ga, (char_u *)" {"); ! for (int i = 0; i < cl->class_obj_member_count; ++i) { ! if (i > 0) ! ga_concat(&ga, (char_u *)", "); ! objmember_T *m = &cl->class_obj_members[i]; ! ga_concat(&ga, m->om_name); ! ga_concat(&ga, (char_u *)": "); ! char_u *tf = NULL; ! ga_concat(&ga, echo_string_core((typval_T *)(obj + 1) + i, &tf, numbuf, copyID, echo_style, restore_copyID, composite_val)); ! vim_free(tf); } - ga_concat(&ga, (char_u *)"}"); - } ! *tofree = r = ga.ga_data; break; case VAR_FLOAT: --- 5874,5909 ---- break; case VAR_OBJECT: { ! garray_T ga; ! ga_init2(&ga, 1, 50); ! ga_concat(&ga, (char_u *)"object of "); ! object_T *obj = tv->vval.v_object; ! class_T *cl = obj == NULL ? NULL : obj->obj_class; ! ga_concat(&ga, cl == NULL ? (char_u *)"[unknown]" ! : cl->class_name); ! if (cl != NULL) { ! ga_concat(&ga, (char_u *)" {"); ! for (int i = 0; i < cl->class_obj_member_count; ++i) ! { ! if (i > 0) ! ga_concat(&ga, (char_u *)", "); ! objmember_T *m = &cl->class_obj_members[i]; ! ga_concat(&ga, m->om_name); ! ga_concat(&ga, (char_u *)": "); ! char_u *tf = NULL; ! ga_concat(&ga, echo_string_core( ! (typval_T *)(obj + 1) + i, &tf, numbuf, copyID, echo_style, restore_copyID, composite_val)); ! vim_free(tf); ! } ! ga_concat(&ga, (char_u *)"}"); } ! *tofree = r = ga.ga_data; ! } break; case VAR_FLOAT: *** ../vim-9.0.1058/src/version.c 2022-12-14 17:30:34.105232856 +0000 --- src/version.c 2022-12-14 17:49:35.491064370 +0000 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1059, /**/ -- I'd like to meet the man who invented sex and see what he's working on now. /// Bram Moolenaar -- Bram@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 ///