File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -658,4 +658,8 @@ extern {
658
658
659
659
#[ cfg( feature="master" ) ]
660
660
pub fn gcc_jit_context_set_output_ident ( ctxt : * mut gcc_jit_context , output_ident : * const c_char ) ;
661
+
662
+ pub fn gcc_jit_version_major ( ) -> c_int ;
663
+ pub fn gcc_jit_version_minor ( ) -> c_int ;
664
+ pub fn gcc_jit_version_patchlevel ( ) -> c_int ;
661
665
}
Original file line number Diff line number Diff line change @@ -66,3 +66,22 @@ pub fn set_global_personality_function_name(name: &'static [u8]) {
66
66
gccjit_sys:: gcc_jit_set_global_personality_function_name ( name. as_ptr ( ) as * const _ ) ;
67
67
}
68
68
}
69
+
70
+ #[ derive( Debug ) ]
71
+ pub struct Version {
72
+ pub major : i32 ,
73
+ pub minor : i32 ,
74
+ pub patch : i32 ,
75
+ }
76
+
77
+ impl Version {
78
+ pub fn get ( ) -> Self {
79
+ unsafe {
80
+ Self {
81
+ major : gccjit_sys:: gcc_jit_version_major ( ) ,
82
+ minor : gccjit_sys:: gcc_jit_version_minor ( ) ,
83
+ patch : gccjit_sys:: gcc_jit_version_patchlevel ( ) ,
84
+ }
85
+ }
86
+ }
87
+ }
You can’t perform that action at this time.
0 commit comments