Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Sep 20, 2023
1 parent ef1b194 commit ba806ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/objc2/src/declare/ivar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ pub unsafe trait IvarType {
#[doc(hidden)]
unsafe fn __offset(ptr: NonNull<AnyObject>) -> isize {
let obj = unsafe { ptr.as_ref() };
std::println!("get offset: {ptr:?}");
ivar_offset(obj.class(), Self::NAME, &Self::Type::ENCODING)
}
}
Expand Down
1 change: 1 addition & 0 deletions crates/objc2/src/runtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,7 @@ impl fmt::Display for AnyProtocol {
}

pub(crate) fn ivar_offset(cls: &AnyClass, name: &str, expected: &Encoding) -> isize {
std::println!("get offset of cls: {cls:?}");
match cls.instance_variable(name) {
Some(ivar) => {
let encoding = ivar.type_encoding();
Expand Down

0 comments on commit ba806ae

Please sign in to comment.