File tree 2 files changed +25
-0
lines changed
2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ comptime {
15
15
_ = @import ("behavior/bugs/1111.zig" );
16
16
_ = @import ("behavior/bugs/1120.zig" );
17
17
_ = @import ("behavior/bugs/1277.zig" );
18
+ _ = @import ("behavior/bugs/1310.zig" );
18
19
_ = @import ("behavior/bugs/1322.zig" );
19
20
_ = @import ("behavior/bugs/1381.zig" );
20
21
_ = @import ("behavior/bugs/1421.zig" );
Original file line number Diff line number Diff line change
1
+ const std = @import ("std" );
2
+ const expect = std .testing .expect ;
3
+
4
+ pub const VM = ? [* ]const struct_InvocationTable_ ;
5
+ pub const struct_InvocationTable_ = extern struct {
6
+ GetVM : ? extern fn (? [* ]VM ) c_int ,
7
+ };
8
+
9
+ pub const struct_VM_ = extern struct {
10
+ functions : ? [* ]const struct_InvocationTable_ ,
11
+ };
12
+
13
+ //excised output from stdlib.h etc
14
+
15
+ pub const InvocationTable_ = struct_InvocationTable_ ;
16
+ pub const VM_ = struct_VM_ ;
17
+
18
+ extern fn agent_callback (_vm : [* ]VM , options : [* ]u8 ) i32 {
19
+ return 11 ;
20
+ }
21
+
22
+ test "fixed" {
23
+ expect (agent_callback (undefined , undefined ) == 11 );
24
+ }
You can’t perform that action at this time.
0 commit comments