Skip to content

Commit bf7d376

Browse files
authored
Merge pull request RustPython#3712 from youknowone/pyfunctionref
Remove PyFunctionRef
2 parents e809158 + 239f92f commit bf7d376

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

vm/src/builtins/function.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
mod jitfunc;
33

44
use super::{
5-
tuple::PyTupleTyped, PyAsyncGen, PyCode, PyCoroutine, PyDictRef, PyGenerator, PyStrRef,
5+
tuple::PyTupleTyped, PyAsyncGen, PyCode, PyCoroutine, PyDictRef, PyGenerator, PyStr, PyStrRef,
66
PyTupleRef, PyTypeRef,
77
};
88
use crate::common::lock::PyMutex;
@@ -21,9 +21,6 @@ use crate::{common::lock::OnceCell, convert::ToPyObject};
2121
use itertools::Itertools;
2222
#[cfg(feature = "jit")]
2323
use rustpython_jit::CompiledCode;
24-
use rustpython_vm::builtins::PyStr;
25-
26-
pub type PyFunctionRef = PyRef<PyFunction>;
2724

2825
#[pyclass(module = false, name = "function")]
2926
#[derive(Debug)]

vm/src/stdlib/builtins.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ mod builtins {
1414
builtins::{
1515
asyncgenerator::PyAsyncGen,
1616
enumerate::PyReverseSequenceIterator,
17-
function::{PyCellRef, PyFunctionRef},
17+
function::{PyCellRef, PyFunction},
1818
int::PyIntRef,
1919
iter::PyCallableIterator,
2020
list::{PyList, SortOptions},
@@ -802,7 +802,7 @@ mod builtins {
802802

803803
#[pyfunction]
804804
pub fn __build_class__(
805-
function: PyFunctionRef,
805+
function: PyRef<PyFunction>,
806806
qualified_name: PyStrRef,
807807
bases: PosArgs,
808808
mut kwargs: KwArgs,

0 commit comments

Comments
 (0)