From 71eb4b2b227c083f187c634212f5fc557f392fb9 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sun, 7 Jun 2020 17:20:37 +0900 Subject: Avoid use of designated initializers to generate `irep` struct. Since it's not supported on VC without `/std:c++latest`. That means it doesn't work for `cxx_api` build on Windows VC. --- src/array.c | 28 ++++++++++++++-------------- src/proc.c | 28 ++++++++++++++-------------- 2 files changed, 28 insertions(+), 28 deletions(-) (limited to 'src') diff --git a/src/array.c b/src/array.c index 773165a8c..a2a8b3eec 100644 --- a/src/array.c +++ b/src/array.c @@ -1311,20 +1311,20 @@ static const mrb_sym each_syms[] = { }; static const mrb_irep each_irep = { - .nlocals = 3, - .nregs = 7, - .flags = MRB_ISEQ_NO_FREE | MRB_IREP_NO_FREE, - .iseq = each_iseq, - .pool = NULL, - .syms = each_syms, - .reps = NULL, - .lv = NULL, - .debug_info = NULL, - .ilen = sizeof(each_iseq), - .plen = 0, - .slen = sizeof(each_syms), - .rlen = 1, - .refcnt = 0, + 3, /* nlocals */ + 7, /* nregs */ + MRB_ISEQ_NO_FREE | MRB_IREP_NO_FREE, /* flags */ + each_iseq, /* iseq */ + NULL, /* pool */ + each_syms, /* syms */ + NULL, /* reps */ + NULL, /* lv */ + NULL, /* debug_info */ + sizeof(each_iseq), /* ilen */ + 0, /* plen */ + sizeof(each_syms), /* slen */ + 1, /* rlen */ + 0, /* refcnt */ }; static void diff --git a/src/proc.c b/src/proc.c index f01c45041..2da2ec77e 100644 --- a/src/proc.c +++ b/src/proc.c @@ -15,20 +15,20 @@ static const mrb_code call_iseq[] = { }; static const mrb_irep call_irep = { - .nlocals = 0, - .nregs = 2, - .flags = MRB_ISEQ_NO_FREE | MRB_IREP_NO_FREE, - .iseq = call_iseq, - .pool = NULL, - .syms = NULL, - .reps = NULL, - .lv = NULL, - .debug_info = NULL, - .ilen = 1, - .plen = 0, - .slen = 0, - .rlen = 1, - .refcnt = 0, + 0, /* nlocals */ + 2, /* nregs */ + MRB_ISEQ_NO_FREE | MRB_IREP_NO_FREE, /* flags */ + call_iseq, /* iseq */ + NULL, /* pool */ + NULL, /* syms */ + NULL, /* reps */ + NULL, /* lv */ + NULL, /* debug_info */ + 1, /* ilen */ + 0, /* plen */ + 0, /* slen */ + 1, /* rlen */ + 0, /* refcnt */ }; struct RProc* -- cgit v1.2.3