guide: don't use `::pyo3`

This commit is contained in:
David Hewitt 2022-08-21 13:27:04 +01:00
parent ef8ccc0deb
commit af60a359c5
2 changed files with 17 additions and 17 deletions

View File

@ -951,8 +951,8 @@ struct MyClass {
# #[allow(dead_code)]
num: i32,
}
unsafe impl ::pyo3::type_object::PyTypeInfo for MyClass {
type AsRefTarget = ::pyo3::PyCell<Self>;
unsafe impl pyo3::type_object::PyTypeInfo for MyClass {
type AsRefTarget = pyo3::PyCell<Self>;
const NAME: &'static str = "MyClass";
const MODULE: ::std::option::Option<&'static str> = ::std::option::Option::None;
#[inline]
@ -963,27 +963,27 @@ unsafe impl ::pyo3::type_object::PyTypeInfo for MyClass {
}
}
impl ::pyo3::PyClass for MyClass {
impl pyo3::PyClass for MyClass {
type Frozen = pyo3::pyclass::boolean_struct::False;
}
impl<'a, 'py> ::pyo3::impl_::extract_argument::PyFunctionArgument<'a, 'py> for &'a MyClass
impl<'a, 'py> pyo3::impl_::extract_argument::PyFunctionArgument<'a, 'py> for &'a MyClass
{
type Holder = ::std::option::Option<::pyo3::PyRef<'py, MyClass>>;
type Holder = ::std::option::Option<pyo3::PyRef<'py, MyClass>>;
#[inline]
fn extract(obj: &'py ::pyo3::PyAny, holder: &'a mut Self::Holder) -> ::pyo3::PyResult<Self> {
::pyo3::impl_::extract_argument::extract_pyclass_ref(obj, holder)
fn extract(obj: &'py pyo3::PyAny, holder: &'a mut Self::Holder) -> pyo3::PyResult<Self> {
pyo3::impl_::extract_argument::extract_pyclass_ref(obj, holder)
}
}
impl<'a, 'py> ::pyo3::impl_::extract_argument::PyFunctionArgument<'a, 'py> for &'a mut MyClass
impl<'a, 'py> pyo3::impl_::extract_argument::PyFunctionArgument<'a, 'py> for &'a mut MyClass
{
type Holder = ::std::option::Option<::pyo3::PyRefMut<'py, MyClass>>;
type Holder = ::std::option::Option<pyo3::PyRefMut<'py, MyClass>>;
#[inline]
fn extract(obj: &'py ::pyo3::PyAny, holder: &'a mut Self::Holder) -> ::pyo3::PyResult<Self> {
::pyo3::impl_::extract_argument::extract_pyclass_ref_mut(obj, holder)
fn extract(obj: &'py pyo3::PyAny, holder: &'a mut Self::Holder) -> pyo3::PyResult<Self> {
pyo3::impl_::extract_argument::extract_pyclass_ref_mut(obj, holder)
}
}
@ -1001,9 +1001,9 @@ impl pyo3::impl_::pyclass::PyClassImpl for MyClass {
type BaseType = PyAny;
type ThreadChecker = pyo3::impl_::pyclass::ThreadCheckerStub<MyClass>;
type PyClassMutability = <<pyo3::PyAny as pyo3::impl_::pyclass::PyClassBaseType>::PyClassMutability as pyo3::impl_::pycell::PyClassMutability>::MutableChild;
type Dict = ::pyo3::impl_::pyclass::PyClassDummySlot;
type WeakRef = ::pyo3::impl_::pyclass::PyClassDummySlot;
type BaseNativeType = ::pyo3::PyAny;
type Dict = pyo3::impl_::pyclass::PyClassDummySlot;
type WeakRef = pyo3::impl_::pyclass::PyClassDummySlot;
type BaseNativeType = pyo3::PyAny;
fn items_iter() -> pyo3::impl_::pyclass::PyClassItemsIter {
use pyo3::impl_::pyclass::*;

View File

@ -57,9 +57,9 @@
//! #
//! // This function is exported to Python.
//! unsafe extern "C" fn __pymethod_increment__(
//! _slf: *mut ::pyo3::ffi::PyObject,
//! _args: *mut ::pyo3::ffi::PyObject,
//! ) -> *mut ::pyo3::ffi::PyObject {
//! _slf: *mut pyo3::ffi::PyObject,
//! _args: *mut pyo3::ffi::PyObject,
//! ) -> *mut pyo3::ffi::PyObject {
//! use :: pyo3 as _pyo3;
//! let gil = _pyo3::GILPool::new();
//! let _py = gil.python();