changeset 489:63f623bff0b9

- test/callback_suite: reverted designated aggr initialization back to what it was, b/c of MSVCs before 2013 not handling a lot of C99
author Tassilo Philipp
date Fri, 18 Mar 2022 12:36:49 +0100
parents 1455b6beedd9
children 17287342e273
files test/callback_suite/env.c
diffstat 1 files changed, 17 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/test/callback_suite/env.c	Fri Mar 18 10:10:16 2022 +0100
+++ b/test/callback_suite/env.c	Fri Mar 18 12:36:49 2022 +0100
@@ -30,22 +30,7 @@
 
 DCValueSet ValueMatrix[CONFIG_MAXARGS];
 
-static DCValueSet K = {
-  .B = DC_TRUE,
-  .c =  13,
-  .C =  19,
-  .s = -23,
-  .S =  41,
-  .i = 134,
-  .I = 257,
-  .j = -12357,
-  .J = 356,
-  .l = -1234556687721LL,
-  .L = 23564634576581ULL,
-  .f = 1.20432545f,
-  .d = 1.0123456,
-  .p = (void*)0x1020345
-};
+static DCValueSet K;
 
 void GetReferenceArg(DCValue* output, char ch, int pos)
 {
@@ -78,6 +63,22 @@
 void InitEnv()
 {
   int pos;
+
+  K.B = DC_TRUE;
+  K.c =  13;
+  K.C =  19;
+  K.s = -23;
+  K.S =  41;
+  K.i = 134;
+  K.I = 257;
+  K.j = -12357;
+  K.J = 356;
+  K.l = -1234556687721LL;
+  K.L = 23564634576581ULL;
+  K.f = 1.20432545f;
+  K.d = 1.0123456;
+  K.p = (void*)0x1020345;
+
   for(pos = 0 ;pos < CONFIG_MAXARGS ;++pos) {
     DCValue ref;
     GetReferenceArg( &ref, DC_SIGCHAR_BOOL     , pos); ValueMatrix[pos].B = ref.B;