Skip to content

Commit fd637f8

Browse files
committed
implement PyTupleMethods
1 parent a115877 commit fd637f8

File tree

4 files changed

+371
-64
lines changed

4 files changed

+371
-64
lines changed

src/instance.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,10 @@ where
302302
unsafe { std::mem::transmute(gil_ref) }
303303
}
304304

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

311311
impl<T> std::fmt::Debug for Borrowed<'_, '_, T> {

src/prelude.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ pub use crate::types::list::PyListMethods;
3434
pub use crate::types::mapping::PyMappingMethods;
3535
pub use crate::types::sequence::PySequenceMethods;
3636
pub use crate::types::string::PyStringMethods;
37+
pub use crate::types::tuple::PyTupleMethods;

src/types/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,5 +304,5 @@ pub(crate) mod set;
304304
mod slice;
305305
pub(crate) mod string;
306306
mod traceback;
307-
mod tuple;
307+
pub(crate) mod tuple;
308308
mod typeobject;

0 commit comments

Comments
 (0)