| ... | ... | @@ -57,7 +57,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 57 | 57 | \\pub extern fn foo() void; |
| 58 | 58 | \\pub fn bar() void { |
| 59 | 59 | \\ var func_ptr: ?*c_void = @ptrCast(?*c_void, foo); |
| 60 | | \\ var typed_func_ptr: ?extern fn() void = @intToPtr(?extern fn() void, c_ulong(@ptrToInt(func_ptr))); |
| 60 | \\ var typed_func_ptr: ?extern fn () void = @intToPtr(?extern fn () void, c_ulong(@ptrToInt(func_ptr))); |
| 61 | 61 | \\} |
| 62 | 62 | ); |
| 63 | 63 | |
| ... | ... | @@ -357,7 +357,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 357 | 357 | \\}; |
| 358 | 358 | , |
| 359 | 359 | \\pub const struct_Foo = extern struct { |
| 360 | | \\ derp: ?extern fn([*c]struct_Foo) void, |
| 360 | \\ derp: ?extern fn ([*c]struct_Foo) void, |
| 361 | 361 | \\}; |
| 362 | 362 | , |
| 363 | 363 | \\pub const Foo = struct_Foo; |
| ... | ... | @@ -440,13 +440,13 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 440 | 440 | \\extern char (*fn_ptr2)(int, float); |
| 441 | 441 | \\#define bar fn_ptr2 |
| 442 | 442 | , |
| 443 | | \\pub extern var fn_ptr: ?extern fn() void; |
| 443 | \\pub extern var fn_ptr: ?extern fn () void; |
| 444 | 444 | , |
| 445 | 445 | \\pub inline fn foo() void { |
| 446 | 446 | \\ return fn_ptr.?(); |
| 447 | 447 | \\} |
| 448 | 448 | , |
| 449 | | \\pub extern var fn_ptr2: ?extern fn(c_int, f32) u8; |
| 449 | \\pub extern var fn_ptr2: ?extern fn (c_int, f32) u8; |
| 450 | 450 | , |
| 451 | 451 | \\pub inline fn bar(arg0: c_int, arg1: f32) u8 { |
| 452 | 452 | \\ return fn_ptr2.?(arg0, arg1); |
| ... | ... | @@ -462,7 +462,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 462 | 462 | cases.add("__cdecl doesn't mess up function pointers", |
| 463 | 463 | \\void foo(void (__cdecl *fn_ptr)(void)); |
| 464 | 464 | , |
| 465 | | \\pub extern fn foo(fn_ptr: ?extern fn() void) void; |
| 465 | \\pub extern fn foo(fn_ptr: ?extern fn () void) void; |
| 466 | 466 | ); |
| 467 | 467 | |
| 468 | 468 | cases.add("comment after integer literal", |
| ... | ... | @@ -1209,8 +1209,8 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 1209 | 1209 | \\ return 0; |
| 1210 | 1210 | \\} |
| 1211 | 1211 | \\pub export fn bar() void { |
| 1212 | | \\ var f: ?extern fn() void = foo; |
| 1213 | | \\ var b: ?extern fn() c_int = baz; |
| 1212 | \\ var f: ?extern fn () void = foo; |
| 1213 | \\ var b: ?extern fn () c_int = baz; |
| 1214 | 1214 | \\ f.?(); |
| 1215 | 1215 | \\ f.?(); |
| 1216 | 1216 | \\ foo(); |
| ... | ... | @@ -1345,9 +1345,9 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 1345 | 1345 | , |
| 1346 | 1346 | \\pub const GLbitfield = c_uint; |
| 1347 | 1347 | , |
| 1348 | | \\pub const PFNGLCLEARPROC = ?extern fn(GLbitfield) void; |
| 1348 | \\pub const PFNGLCLEARPROC = ?extern fn (GLbitfield) void; |
| 1349 | 1349 | , |
| 1350 | | \\pub const OpenGLProc = ?extern fn() void; |
| 1350 | \\pub const OpenGLProc = ?extern fn () void; |
| 1351 | 1351 | , |
| 1352 | 1352 | \\pub const union_OpenGLProcs = extern union { |
| 1353 | 1353 | \\ ptr: [1]OpenGLProc, |