Skip to content

Commit eed449c

Browse files
committed
fbc: thiscall, fix call2 test for stdc++98
1 parent 686164b commit eed449c

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

tests/cpp/call2-cpp.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -132,21 +132,21 @@ void sub1_c_stdcall( UDT const& a ) {
132132
}
133133

134134
UDT func1_c_default( UDT const& a ) {
135-
UDT ret = {0};
135+
UDT ret = UDT(0);
136136
ptr1 = &a;
137137
setMsg( "func1_c_default" );
138138
return ret;
139139
}
140140

141141
UDT func1_c_cdecl( UDT const& a ) {
142-
UDT ret = {0};
142+
UDT ret = UDT(0);
143143
ptr1 = &a;
144144
setMsg( "func1_c_cdecl" );
145145
return ret;
146146
}
147147

148148
UDT func1_c_stdcall( UDT const& a ) {
149-
UDT ret = {0};
149+
UDT ret = UDT(0);
150150
ptr1 = &a;
151151
setMsg( "func1_c_stdcall" );
152152
return ret;
@@ -171,23 +171,23 @@ void sub2_c_stdcall( UDT const& a, UDT const& b ) {
171171
}
172172

173173
UDT func2_c_default( UDT const& a, UDT const& b ) {
174-
UDT ret = {0};
174+
UDT ret = UDT(0);
175175
ptr1 = &a;
176176
ptr2 = &b;
177177
setMsg( "func2_c_default" );
178178
return ret;
179179
}
180180

181181
UDT func2_c_cdecl( UDT const& a, UDT const& b ) {
182-
UDT ret = {0};
182+
UDT ret = UDT(0);
183183
ptr1 = &a;
184184
ptr2 = &b;
185185
setMsg( "func2_c_cdecl" );
186186
return ret;
187187
}
188188

189189
UDT func2_c_stdcall( UDT const& a, UDT const& b ) {
190-
UDT ret = {0};
190+
UDT ret = UDT(0);
191191
ptr1 = &a;
192192
ptr2 = &b;
193193
setMsg( "func2_c_stdcall" );
@@ -216,7 +216,7 @@ void sub3_c_stdcall( UDT const& a, UDT const& b, UDT const& c ) {
216216
}
217217

218218
UDT func3_c_default( UDT const& a, UDT const& b, UDT const& c ) {
219-
UDT ret = {0};
219+
UDT ret = UDT(0);
220220
ptr1 = &a;
221221
ptr2 = &b;
222222
ptr3 = &c;
@@ -225,7 +225,7 @@ UDT func3_c_default( UDT const& a, UDT const& b, UDT const& c ) {
225225
}
226226

227227
UDT func3_c_cdecl( UDT const& a, UDT const& b, UDT const& c ) {
228-
UDT ret = {0};
228+
UDT ret = UDT(0);
229229
ptr1 = &a;
230230
ptr2 = &b;
231231
ptr3 = &c;
@@ -234,7 +234,7 @@ UDT func3_c_cdecl( UDT const& a, UDT const& b, UDT const& c ) {
234234
}
235235

236236
UDT func3_c_stdcall( UDT const& a, UDT const& b, UDT const& c ) {
237-
UDT ret = {0};
237+
UDT ret = UDT(0);
238238
ptr1 = &a;
239239
ptr2 = &b;
240240
ptr3 = &c;
@@ -259,21 +259,21 @@ void sub1_cpp_stdcall( UDT const& a ) {
259259
}
260260

261261
UDT func1_cpp_default( UDT const& a ) {
262-
UDT ret = {0};
262+
UDT ret = UDT(0);
263263
ptr1 = &a;
264264
setMsg( "func1_cpp_default" );
265265
return ret;
266266
}
267267

268268
UDT func1_cpp_cdecl( UDT const& a ) {
269-
UDT ret = {0};
269+
UDT ret = UDT(0);
270270
ptr1 = &a;
271271
setMsg( "func1_cpp_cdecl" );
272272
return ret;
273273
}
274274

275275
UDT func1_cpp_stdcall( UDT const& a ) {
276-
UDT ret = {0};
276+
UDT ret = UDT(0);
277277
ptr1 = &a;
278278
setMsg( "func1_cpp_stdcall" );
279279
return ret;
@@ -298,23 +298,23 @@ void sub2_cpp_stdcall( UDT const& a, UDT const& b ) {
298298
}
299299

300300
UDT func2_cpp_default( UDT const& a, UDT const& b ) {
301-
UDT ret = {0};
301+
UDT ret = UDT(0);
302302
ptr1 = &a;
303303
ptr2 = &b;
304304
setMsg( "func2_cpp_default" );
305305
return ret;
306306
}
307307

308308
UDT func2_cpp_cdecl( UDT const& a, UDT const& b ) {
309-
UDT ret = {0};
309+
UDT ret = UDT(0);
310310
ptr1 = &a;
311311
ptr2 = &b;
312312
setMsg( "func2_cpp_cdecl" );
313313
return ret;
314314
}
315315

316316
UDT func2_cpp_stdcall( UDT const& a, UDT const& b ) {
317-
UDT ret = {0};
317+
UDT ret = UDT(0);
318318
ptr1 = &a;
319319
ptr2 = &b;
320320
setMsg( "func2_cpp_stdcall" );
@@ -343,7 +343,7 @@ void sub3_cpp_stdcall( UDT const& a, UDT const& b, UDT const& c ) {
343343
}
344344

345345
UDT func3_cpp_default( UDT const& a, UDT const& b, UDT const& c ) {
346-
UDT ret = {0};
346+
UDT ret = UDT(0);
347347
ptr1 = &a;
348348
ptr2 = &b;
349349
ptr3 = &c;
@@ -352,7 +352,7 @@ UDT func3_cpp_default( UDT const& a, UDT const& b, UDT const& c ) {
352352
}
353353

354354
UDT func3_cpp_cdecl( UDT const& a, UDT const& b, UDT const& c ) {
355-
UDT ret = {0};
355+
UDT ret = UDT(0);
356356
ptr1 = &a;
357357
ptr2 = &b;
358358
ptr3 = &c;
@@ -361,7 +361,7 @@ UDT func3_cpp_cdecl( UDT const& a, UDT const& b, UDT const& c ) {
361361
}
362362

363363
UDT func3_cpp_stdcall( UDT const& a, UDT const& b, UDT const& c ) {
364-
UDT ret = {0};
364+
UDT ret = UDT(0);
365365
ptr1 = &a;
366366
ptr2 = &b;
367367
ptr3 = &c;

tests/cpp/call2-fbc.bas

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ extern "c++"
3737

3838
type UDT
3939
value as long
40-
declare constructor()
41-
declare constructor( byval rhs as long )
42-
declare constructor( byref rhs as const UDT )
43-
declare destructor()
40+
declare constructor thiscall ()
41+
declare constructor thiscall ( byval rhs as long )
42+
declare constructor thiscall ( byref rhs as const UDT )
43+
declare destructor thiscall ()
4444
end type
4545

4646
end extern

0 commit comments

Comments
 (0)