From 1fd0aa2b19f98c3791c03fe68998d784b5752965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20=C5=A0nuderl?= Date: Mon, 5 Feb 2024 08:03:03 +0100 Subject: [PATCH] Use new method to implement old --- src/types/ellipsis.rs | 2 +- src/types/notimplemented.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/ellipsis.rs b/src/types/ellipsis.rs index 17d51095..9151e89d 100644 --- a/src/types/ellipsis.rs +++ b/src/types/ellipsis.rs @@ -18,7 +18,7 @@ impl PyEllipsis { )] #[inline] pub fn get(py: Python<'_>) -> &PyEllipsis { - unsafe { py.from_borrowed_ptr(ffi::Py_Ellipsis()) } + Self::get_bound(py).into_gil_ref() } /// Returns the `Ellipsis` object. diff --git a/src/types/notimplemented.rs b/src/types/notimplemented.rs index 083eec7f..7560dff3 100644 --- a/src/types/notimplemented.rs +++ b/src/types/notimplemented.rs @@ -18,7 +18,7 @@ impl PyNotImplemented { )] #[inline] pub fn get(py: Python<'_>) -> &PyNotImplemented { - unsafe { py.from_borrowed_ptr(ffi::Py_NotImplemented()) } + Self::get_bound(py).into_gil_ref() } /// Returns the `NotImplemented` object.