Skip to content

Commit 1c4fbce

Browse files
committed
Add Type::set_addressable
1 parent 345d267 commit 1c4fbce

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

gccjit_sys/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,4 +708,7 @@ extern "C" {
708708

709709
#[cfg(feature="master")]
710710
pub fn gcc_jit_is_lto_supported() -> bool;
711+
712+
#[cfg(feature="master")]
713+
pub fn gcc_jit_type_set_addressable(typ: *mut gcc_jit_type);
711714
}

src/types.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@ impl<'ctx> Type<'ctx> {
120120
}
121121
}
122122

123+
#[cfg(feature="master")]
124+
pub fn set_addressable(&self) {
125+
unsafe {
126+
gccjit_sys::gcc_jit_type_set_addressable(self.ptr);
127+
}
128+
}
129+
123130
/// Given a type T, creates a type of const T.
124131
pub fn make_const(self) -> Type<'ctx> {
125132
unsafe {

0 commit comments

Comments
 (0)