@@ -99,7 +99,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
9999 cases .add ("restrict -> noalias" ,
100100 \\void foo(void *restrict bar, void *restrict);
101101 ,
102- \\pub extern fn foo(noalias bar: ?[*] c_void, noalias arg1: ?[*] c_void) void;
102+ \\pub extern fn foo(noalias bar: ?* c_void, noalias arg1: ?* c_void) void;
103103 );
104104
105105 cases .add ("simple struct" ,
@@ -172,7 +172,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
172172 ,
173173 \\pub const struct_Foo = @OpaqueType();
174174 ,
175- \\pub extern fn some_func(foo: ?[*] struct_Foo, x: c_int) ?[*] struct_Foo;
175+ \\pub extern fn some_func(foo: ?* struct_Foo, x: c_int) ?* struct_Foo;
176176 ,
177177 \\pub const Foo = struct_Foo;
178178 );
@@ -233,7 +233,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
233233 ,
234234 \\pub const Foo = c_void;
235235 ,
236- \\pub extern fn fun(a: ?[*] Foo) Foo;
236+ \\pub extern fn fun(a: ?* Foo) Foo;
237237 );
238238
239239 cases .add ("generate inline func for #define global extern fn" ,
@@ -505,7 +505,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
505505 \\ return 6;
506506 \\}
507507 ,
508- \\pub export fn and_or_none_bool(a: c_int, b: f32, c: ?[*] c_void) c_int {
508+ \\pub export fn and_or_none_bool(a: c_int, b: f32, c: ?* c_void) c_int {
509509 \\ if ((a != 0) and (b != 0)) return 0;
510510 \\ if ((b != 0) and (c != null)) return 1;
511511 \\ if ((a != 0) and (c != null)) return 2;
@@ -653,8 +653,8 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
653653 \\ return x;
654654 \\}
655655 ,
656- \\pub export fn foo(x: ?[*]c_ushort) ?[*] c_void {
657- \\ return @ptrCast(?[*] c_void, x);
656+ \\pub export fn foo(x: ?[*]c_ushort) ?* c_void {
657+ \\ return @ptrCast(?* c_void, x);
658658 \\}
659659 );
660660
@@ -1173,7 +1173,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
11731173 \\ return !c;
11741174 \\}
11751175 ,
1176- \\pub fn foo(a: c_int, b: f32, c: ?[*] c_void) c_int {
1176+ \\pub fn foo(a: c_int, b: f32, c: ?* c_void) c_int {
11771177 \\ return !(a == 0);
11781178 \\ return !(a != 0);
11791179 \\ return !(b != 0);
@@ -1231,7 +1231,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
12311231 \\ B,
12321232 \\ C,
12331233 \\};
1234- \\pub fn if_none_bool(a: c_int, b: f32, c: ?[*] c_void, d: enum_SomeEnum) c_int {
1234+ \\pub fn if_none_bool(a: c_int, b: f32, c: ?* c_void, d: enum_SomeEnum) c_int {
12351235 \\ if (a != 0) return 0;
12361236 \\ if (b != 0) return 1;
12371237 \\ if (c != null) return 2;
@@ -1248,7 +1248,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
12481248 \\ return 3;
12491249 \\}
12501250 ,
1251- \\pub fn while_none_bool(a: c_int, b: f32, c: ?[*] c_void) c_int {
1251+ \\pub fn while_none_bool(a: c_int, b: f32, c: ?* c_void) c_int {
12521252 \\ while (a != 0) return 0;
12531253 \\ while (b != 0) return 1;
12541254 \\ while (c != null) return 2;
@@ -1264,7 +1264,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
12641264 \\ return 3;
12651265 \\}
12661266 ,
1267- \\pub fn for_none_bool(a: c_int, b: f32, c: ?[*] c_void) c_int {
1267+ \\pub fn for_none_bool(a: c_int, b: f32, c: ?* c_void) c_int {
12681268 \\ while (a != 0) return 0;
12691269 \\ while (b != 0) return 1;
12701270 \\ while (c != null) return 2;
0 commit comments