Mercurial > pub > dyncall > dyncall
comparison test/callf/main.c @ 600:d9558c1555df
test/callf: dcNewAggr() calls param fixes, used wrong field count
author | Tassilo Philipp |
---|---|
date | Wed, 21 Sep 2022 10:52:05 +0200 |
parents | 71c884e610f0 |
children | b1f2b574d772 |
comparison
equal
deleted
inserted
replaced
599:ed8917f53c45 | 600:d9558c1555df |
---|---|
176 #if defined(DC__Feature_AggrByVal) | 176 #if defined(DC__Feature_AggrByVal) |
177 /* aggregate return value test */ | 177 /* aggregate return value test */ |
178 { | 178 { |
179 int r_; | 179 int r_; |
180 struct A a; | 180 struct A a; |
181 DCaggr *s = dcNewAggr(1, sizeof(struct A)); | 181 DCaggr *s = dcNewAggr(2, sizeof(struct A)); |
182 dcAggrField(s, DC_SIGCHAR_INT, offsetof(struct A, i), 1); | 182 dcAggrField(s, DC_SIGCHAR_INT, offsetof(struct A, i), 1); |
183 dcAggrField(s, DC_SIGCHAR_CHAR, offsetof(struct A, x), 7); | 183 dcAggrField(s, DC_SIGCHAR_CHAR, offsetof(struct A, x), 7); |
184 dcCloseAggr(s); | 184 dcCloseAggr(s); |
185 | 185 |
186 dcReset(vm); | 186 dcReset(vm); |
195 } | 195 } |
196 /* aggregate return value test */ | 196 /* aggregate return value test */ |
197 { | 197 { |
198 int r_; | 198 int r_; |
199 struct B b; | 199 struct B b; |
200 DCaggr *s = dcNewAggr(1, sizeof(struct B)); | 200 DCaggr *s = dcNewAggr(2, sizeof(struct B)); |
201 dcAggrField(s, DC_SIGCHAR_INT, offsetof(struct B, i), 1); | 201 dcAggrField(s, DC_SIGCHAR_INT, offsetof(struct B, i), 1); |
202 dcAggrField(s, DC_SIGCHAR_UCHAR, offsetof(struct B, x), 7); | 202 dcAggrField(s, DC_SIGCHAR_UCHAR, offsetof(struct B, x), 7); |
203 dcCloseAggr(s); | 203 dcCloseAggr(s); |
204 | 204 |
205 dcReset(vm); | 205 dcReset(vm); |