File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -339,6 +339,8 @@ extern {
339
339
pub fn gcc_jit_type_get_pointer ( ty : * mut gcc_jit_type ) -> * mut gcc_jit_type ;
340
340
pub fn gcc_jit_type_get_const ( ty : * mut gcc_jit_type ) -> * mut gcc_jit_type ;
341
341
pub fn gcc_jit_type_get_volatile ( ty : * mut gcc_jit_type ) -> * mut gcc_jit_type ;
342
+ #[ cfg( feature="master" ) ]
343
+ pub fn gcc_jit_type_get_restrict ( ty : * mut gcc_jit_type ) -> * mut gcc_jit_type ;
342
344
pub fn gcc_jit_context_new_array_type ( ctx : * mut gcc_jit_context ,
343
345
loc : * mut gcc_jit_location ,
344
346
ty : * mut gcc_jit_type ,
Original file line number Diff line number Diff line change @@ -137,6 +137,15 @@ impl<'ctx> Type<'ctx> {
137
137
}
138
138
}
139
139
140
+ /// Given a type T, creates a new type of restrict T, which
141
+ /// has the semantics of C's restrict.
142
+ #[ cfg( feature="master" ) ]
143
+ pub fn make_restrict ( self ) -> Type < ' ctx > {
144
+ unsafe {
145
+ from_ptr ( gccjit_sys:: gcc_jit_type_get_restrict ( self . ptr ) )
146
+ }
147
+ }
148
+
140
149
pub fn get_aligned ( self , alignment_in_bytes : u64 ) -> Type < ' ctx > {
141
150
unsafe {
142
151
from_ptr ( gccjit_sys:: gcc_jit_type_get_aligned ( self . ptr , alignment_in_bytes as _ ) )
You can’t perform that action at this time.
0 commit comments