Skip to content

Commit

Permalink
deprecate unsound types
Browse files Browse the repository at this point in the history
  • Loading branch information
gnzlbg committed Oct 27, 2018
1 parent 66ee800 commit 2716d61
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/task_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ pub type task_info_t = *mut integer_t;

#[repr(C)]
#[cfg_attr(feature = "unstable", repr(packed(4)))]
#[cfg_attr(
not(feature = "unstable"),
deprecated(
since = "0.2.3",
note = "requires the unstable feature to avoid undefined behavior"
)
)]
pub struct task_dyld_info {
pub all_image_info_addr: mach_vm_address_t,
pub all_image_info_size: mach_vm_size_t,
Expand Down
28 changes: 28 additions & 0 deletions src/vm_region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ pub const SM_SHARED_ALIASED: ::libc::c_uchar = 7;

#[repr(C)]
#[cfg_attr(feature = "unstable", repr(packed(4)))]
#[cfg_attr(
not(feature = "unstable"),
deprecated(
since = "0.2.3",
note = "requires the unstable feature to avoid undefined behavior"
)
)]
#[derive(Copy, Clone, Debug)]
pub struct vm_region_basic_info_64 {
pub protection: vm_prot_t,
Expand Down Expand Up @@ -163,6 +170,13 @@ impl vm_region_submap_info {

#[repr(C)]
#[cfg_attr(feature = "unstable", repr(packed(4)))]
#[cfg_attr(
not(feature = "unstable"),
deprecated(
since = "0.2.3",
note = "requires the `unstable` feature to avoid undefined behavior"
)
)]
#[derive(Copy, Clone, Debug)]
pub struct vm_region_submap_info_64 {
pub protection: vm_prot_t,
Expand Down Expand Up @@ -193,6 +207,13 @@ impl vm_region_submap_info_64 {

#[repr(C)]
#[cfg_attr(feature = "unstable", repr(packed(4)))]
#[cfg_attr(
not(feature = "unstable"),
deprecated(
since = "0.2.3",
note = "requires the `unstable` feature to avoid undefined behavior"
)
)]
#[derive(Copy, Clone, Debug)]
pub struct vm_region_submap_short_info_64 {
pub protection: vm_prot_t,
Expand Down Expand Up @@ -235,6 +256,13 @@ impl vm_page_info_basic {

#[repr(C)]
#[cfg_attr(feature = "unstable", repr(packed(4)))]
#[cfg_attr(
not(feature = "unstable"),
deprecated(
since = "0.2.3",
note = "requires the `unstable` feature to avoid undefined behavior"
)
)]
#[derive(Copy, Clone, Debug)]
pub struct mach_vm_read_entry {
pub address: mach_vm_address_t,
Expand Down

0 comments on commit 2716d61

Please sign in to comment.