Skip to content

Commit

Permalink
implement PyTupleMethods
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Dec 22, 2023
1 parent a115877 commit fd637f8
Show file tree
Hide file tree
Showing 4 changed files with 371 additions and 64 deletions.
8 changes: 4 additions & 4 deletions src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,10 @@ where
unsafe { std::mem::transmute(gil_ref) }
}

// pub(crate) fn into_gil_ref(self) -> &'py T::AsRefTarget {
// // Safety: self is a borrow over `'py`.
// unsafe { self.py().from_borrowed_ptr(self.0.as_ptr()) }
// }
pub(crate) fn into_gil_ref(self) -> &'py T::AsRefTarget {
// Safety: self is a borrow over `'py`.
unsafe { self.py().from_borrowed_ptr(self.0.as_ptr()) }
}
}

impl<T> std::fmt::Debug for Borrowed<'_, '_, T> {
Expand Down
1 change: 1 addition & 0 deletions src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ pub use crate::types::list::PyListMethods;
pub use crate::types::mapping::PyMappingMethods;
pub use crate::types::sequence::PySequenceMethods;
pub use crate::types::string::PyStringMethods;
pub use crate::types::tuple::PyTupleMethods;
2 changes: 1 addition & 1 deletion src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,5 +304,5 @@ pub(crate) mod set;
mod slice;
pub(crate) mod string;
mod traceback;
mod tuple;
pub(crate) mod tuple;
mod typeobject;
Loading

0 comments on commit fd637f8

Please sign in to comment.