Skip to content

Commit 5fac7ad

Browse files
authored
Add pointer access to owned tables. (#289)
1 parent 4aa41d3 commit 5fac7ad

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/_macros.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,16 @@ macro_rules! build_owned_tables {
573573
}
574574
}
575575
}
576+
577+
impl $name {
578+
pub fn as_ptr(&self) -> *const $llname {
579+
&*self.table
580+
}
581+
582+
pub fn as_mut_ptr(&mut self) -> *mut $llname {
583+
&mut *self.table as *mut $llname
584+
}
585+
}
576586
};
577587
}
578588

0 commit comments

Comments
 (0)