Skip to content

Commit 30a8447

Browse files
committed
patch 9.0.1358: compilation error with some compilers
Problem: Compilation error with some compilers. Solution: Avoid using "class" as member name.
1 parent c4e1b86 commit 30a8447

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,8 @@ static char *(features[]) =
695695

696696
static int included_patches[] =
697697
{ /* Add new patch number below this line */
698+
/**/
699+
1358,
698700
/**/
699701
1357,
700702
/**/

src/vim9.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ typedef enum {
102102
ISN_PUSHCHANNEL, // push NULL channel
103103
ISN_PUSHJOB, // push NULL job
104104
ISN_PUSHOBJ, // push NULL object
105-
ISN_PUSHCLASS, // push class, uses isn_arg.class
105+
ISN_PUSHCLASS, // push class, uses isn_arg.classarg
106106
ISN_NEWLIST, // push list from stack items, size is isn_arg.number
107107
// -1 for null_list
108108
ISN_NEWDICT, // push dict from stack items, size is isn_arg.number
@@ -520,7 +520,7 @@ struct isn_S {
520520
channel_T *channel;
521521
job_T *job;
522522
partial_T *partial;
523-
class_T *class;
523+
class_T *classarg;
524524
jump_T jump;
525525
jumparg_T jumparg;
526526
forloop_T forloop;

src/vim9execute.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4071,7 +4071,7 @@ exec_instructions(ectx_T *ectx)
40714071
break;
40724072
case ISN_PUSHCLASS:
40734073
tv->v_type = VAR_CLASS;
4074-
tv->vval.v_class = iptr->isn_arg.class;
4074+
tv->vval.v_class = iptr->isn_arg.classarg;
40754075
break;
40764076
default:
40774077
tv->v_type = VAR_STRING;
@@ -6676,8 +6676,8 @@ list_instructions(char *pfx, isn_T *instr, int instr_count, ufunc_T *ufunc)
66766676
break;
66776677
case ISN_PUSHCLASS:
66786678
smsg("%s%4d PUSHCLASS %s", pfx, current,
6679-
iptr->isn_arg.class == NULL ? "null"
6680-
: (char *)iptr->isn_arg.class->class_name);
6679+
iptr->isn_arg.classarg == NULL ? "null"
6680+
: (char *)iptr->isn_arg.classarg->class_name);
66816681
break;
66826682
case ISN_PUSHEXC:
66836683
smsg("%s%4d PUSH v:exception", pfx, current);

src/vim9instr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ generate_PUSHCLASS(cctx_T *cctx, class_T *class)
678678
class == NULL ? &t_any : &class->class_type);
679679
if (isn == NULL)
680680
return FAIL;
681-
isn->isn_arg.class = class;
681+
isn->isn_arg.classarg = class;
682682
if (class != NULL)
683683
++class->class_refcount;
684684
return OK;
@@ -2509,7 +2509,7 @@ delete_instr(isn_T *isn)
25092509
break;
25102510

25112511
case ISN_PUSHCLASS:
2512-
class_unref(isn->isn_arg.class);
2512+
class_unref(isn->isn_arg.classarg);
25132513
break;
25142514

25152515
case ISN_UCALL:

0 commit comments

Comments
 (0)